Hi!
I'm using Voce and it's very very powerful!!
These are some useful steps:
. extract the Voce.zip into the processing library;
. rename the "lib" directory into "library";
. copy, paste and save the sketch below;
. create a dir for "*.gram" file (fill it with code at the end of page) into sketch dir;
. set the right paths;
. enjoy it!
The Sketch:
Code:
import voce.*;
void setup() {
size(200,200);
background(0);
voce.SpeechInterface.init("[Voce library Path]", true, true,
"[grammar Path]", "[grammar file name]");
System.out.println("This is a speech recognition test. ");
}
void draw() {
stroke(255);
while (voce.SpeechInterface.getRecognizerQueueSize() > 0){
String s = voce.SpeechInterface.popRecognizedString();
println("You said: " + s);
voce.SpeechInterface.synthesize(s);
}
}
Grammar file:
Code:
#JSGF V1.0;
/**
* JSGF Test Grammar file
*/
grammar Test;
public <TEST> = (hi | one | two | ok) * ;