Go to www.cygwin.com and download the setup file. Direct link: http://www.cygwin.com/setup.exe Go to http://sourceforge.net/projects/cmusphinx/ and download sphinx2 (version .4). Direct link: http://prdownloads.sourceforge.net/cmusphinx/sphinx2-0.4.tar.gz?download Save this file in a new directory at C:\sphinx Install cgywin: Double click setup.exe that you downloaded. When it asks for the Root Directory, choose C:\cygwin When it asks for the Local Package Directory, choose C:\cygwin\packages Choose any download site you want. When you get to the select packages screen, you need to change the defaults as follows: Click on "default" next to Arhive to change it to "install". Click on "default" next to Devel to change it to "install". Click on "default" next to Editors to change it to "install". Proceed with download. Install sphinx: Start the cygwin bash shell (you should either have a link on the desktop or in start->program files). Type the following commands in order: cd /cygdrive/c/sphinx gunzip sphinx2-0.4.tar.gz tar -xf sphinx2-0.4.tar cd sphinx2-0.4 ./configure --prefix=/cygdrive/c/sphinx/sphinx2 make make install Unzip the file accompanying this document. Add helper files: Copy the files sphinx2-current and sphinx2-current-run to the bin directory, C:\sphinx\sphinx2\bin under windows or /cygdrive/c/sphinx/sphinx2/bin under cygwin. Add language model: Copy the directory "current" to C:\sphinx\sphinx2\share\sphinx2\model\lm Test sphinx: Run the following two commands. cd /cygdrive/c/sphinx/sphinx2/bin ./sphinx2-current-run You should get a good deal of output, and near the end you should see something that says: BESTPATH: GO FORWARD FIVE METERS If you see this, sphinx has correctly recognized the speech in an example file Test Example Application: Copy the "Speech" directory to your ProblemsOrganizer. Open NetBeans and mount the example application folder. Build each of the four java files. Run Interface.java Open the GoForward problem under Speech->test->test in the Behavior recorder. Run by clicking start, speaking the utterance, and clicking stop. -------------------------------------------------------------------- To use this on a linux-like machine (such as on a Mac OS X machine) (no longer using cygwin), you need to change some paths to point to their linux equivalents: This assumes sphinx is installed at /sphinx2 In the two "helper" files/shell scripts: In file sphinx2-current: Change line from SPHINXBINDIR=/cygdrive/c/sphinx/sphinx2/bin to SPHINXBINDIR=/sphinx2/bin In file sphinx2-current-run: change lines from HMM=/cygdrive/c/sphinx/sphinx2/share/sphinx2/model/hmm/6k TASK=/cygdrive/c/sphinx/sphinx2/share/sphinx2/model/lm/current CTLFILE=/cygdrive/c/sphinx/sphinx2/share/sphinx2/model/lm/current/current.ctl to HMM=/sphinx2/share/sphinx2/model/hmm/6k TASK=/sphinx2/share/sphinx2/model/lm/current CTLFILE=/sphinx2/share/sphinx2/model/lm/current/current.ctl In the Java code (you can change this in NetBeans): In file Recognizer.java: At line 62, in the method doRecognize(), change the command string from "C:\\cygwin\\bin\\bash --login -c \"/cygdrive/c/sphinx/sphinx2/bin/sphinx2-current\"" to "/sphinx2/bin/sphinx2-current" In file TutorInterface.java: In the event handler for the start/record button (line 120 in my example application), change the audioFile string to "/sphinx2/share/sphinx2/model/lm/current/current.16k" and the hypFile string to "/sphinx2/share/sphinx2/model/lm/current/current.hyp"