Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import voce.*;
- void setup(){
- size(600,600);
- voce.SpeechInterface.init("C:/Users/nicolas.regnault/Documents/Processing/libraries/Voce/library",
- true, true, "file:/C:/Users/nicolas.regnault/Desktop/Reconnaissance_Vocale/Grammar", "digits");
- voce.SpeechInterface.synthesize("hello world");
- // Speech recognition in Java
- while (voce.SpeechInterface.getRecognizerQueueSize() > 0)
- {
- String s = voce.SpeechInterface.popRecognizedString();
- System.out.println("You said: " + s);
- }
- }
- void draw(){
- while (voce.SpeechInterface.getRecognizerQueueSize() > 0){
- String s = voce.SpeechInterface.popRecognizedString();
- println("You said: " + s);
- voce.SpeechInterface.synthesize(s);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement