Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import voce.*;
  2.  
  3.  
  4. void setup(){
  5. size(600,600);
  6.  
  7. voce.SpeechInterface.init("C:/Users/nicolas.regnault/Documents/Processing/libraries/Voce/library",
  8. true, true, "file:/C:/Users/nicolas.regnault/Desktop/Reconnaissance_Vocale/Grammar", "digits");
  9.  
  10. voce.SpeechInterface.synthesize("hello world");
  11.  
  12. // Speech recognition in Java
  13. while (voce.SpeechInterface.getRecognizerQueueSize() > 0)
  14. {
  15. String s = voce.SpeechInterface.popRecognizedString();
  16. System.out.println("You said: " + s);
  17. }
  18.  
  19. }
  20.  
  21. void draw(){
  22. while (voce.SpeechInterface.getRecognizerQueueSize() > 0){
  23. String s = voce.SpeechInterface.popRecognizedString();
  24. println("You said: " + s);
  25. voce.SpeechInterface.synthesize(s);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement