Sphinx-4 Hello World! Demo |
This is a simple command line program that shows how to write a simple Sphinx-4 application that recognizes simple sentences using a BNF-style grammar. When you run the demo, you will see the following:
sphinx4>java -mx312m -jar bin/HelloWorld.jar Loading... Say: (Good morning | Hello) ( Bhiksha | Evandro | Paul | Philip | Rita | Will ) Start speaking. Press Ctrl-C to quit. You said: good morning paul Start speaking. Press Ctrl-C to quit. You said: hello will Start speaking. Press Ctrl-C to quit. You said: hello bhiksha Start speaking. Press Ctrl-C to quit.
Check if the bin
directory already has the
HelloWorld.jar
file. If not, type the following in the top
level directory:
ant -find demo.xml
First make sure that you have JSAPI setup correctly. Then, to run the demo, type:
sphinx4> java -mx256m -jar bin/HelloWorld.jar
NOTE:
lib/sphinx4.jar
is built. If not, go to the top level
directory and type: ant
The list of allowable sentences in this demo are:
Hello Bhiksha Hello Evandro Hello Paul Hello Philip Hello Rita Hello Will Good morning Bhiksha Good morning Evandro Good morning Paul Good morning Philip Good morning Rita Good morning Will