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.
      

Building

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

Running

First make sure that you have JSAPI setup correctly. Then, to run the demo, type:

sphinx4> java -mx256m -jar bin/HelloWorld.jar

NOTE:

  1. Make sure that you give it a large enough heap by putting in "-mx256m".
  2. Make sure that you are using JavaTM 2 SDK, Standard Edition, v1.4 or higher.
  3. If you are running Linux and have problems with the audio, please read the Linux JavaSound section.
  4. If you have the source distribution, make sure that the JAR file 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
      

Copyright 1999-2004 Carnegie Mellon University.
Portions Copyright 2002-2004 Sun Microsystems, Inc.
Portions Copyright 2002-2004 Mitsubishi Electric Research Laboratories.
All Rights Reserved. Usage is subject to license terms.