svn checkout
http://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/branches/pocketsphinx-0.6
cd pocketsphinx-0.6/sphinxbase
./autogen.sh
make
make install
cd ../pocketsphinx
./autogen.sh
make
make install
Note: If you get an error that looks like this after the 'make' command in the pocketsphinx directory:
error: command 'gcc' failed with exit status 1
Makefile:501: recipe for target `pymod-build-stamp' failed
make[1]: *** [pymod-build-stamp] Error 1
make[1]: Leaving directory
`/home/username/Installs/pocketsphinx-0.6/pocketsphinx/python'
Makefile:360: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1
and add iconv to it so that it says:
libraries=['pocketsphinx', 'sphinxbase', 'iconv'],
and run make again from the pocketsphinx directory.
You will also need the default WSJ acoustic and language models - we have those on the lab machines, and you can copy those directly (nothing needs to be compiled):
scp -r yourusername@gatto.cs.columbia.edu:/proj/speech/tools/pocketsphinx/share/pocketsphinx/model/hmm/wsj1 /usr/local/share/pocketsphinx/model/hmm/
export
LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export PS_BASE=/usr/local
and run source ~/.bashrc to apply the changes.
PocketSphinx by default installs the Python module to a location that is non-standard for CygWin. The simplest way to be able to use it is to move it to the standard location:
mv /usr/local/lib/python2.6/site-packages/* /usr/lib/python2.6/site-packages/ We have set up some PocketSphinx examples on the lab machines; you can make sure that your install is working by copying them to your own computer; the examples can be found in /proj/speech/tools/pocketsphinx/example/ on any lab machine. To run the Python example and check that your installation works, run
To run the C example, first you need to compile it:
gcc -o example example.c
-DMODELDIR=\"/usr/local/share/pocketsphinx/model\"
-I/usr/local/include/sphinxbase -I/usr/local/include/pocketsphinx
-L/usr/local/lib -lpocketsphinx -lsphinxbase -lsphinxad -liconv
As with the Python example, you should see a bunch of output from
PocketSphinx, followed by:
Recognized: do four eight eight meters
If you want to use your own install of PocketSphinx to do Project Part 2, you will need to copy the additional acoustic models from lab to your own computer:
scp -r
yourusername@gatto.cs.columbia.edu:/proj/speech/tools/pocketsphinx/share/pocketsphinx/model/hmm/en_US
$PS_BASE/share/pocketsphinx/model/hmm/
scp -r
yourusername@gatto.cs.columbia.edu:/proj/speech/tools/pocketsphinx/share/pocketsphinx/model/hmm/us
$PS_BASE/share/pocketsphinx/model/hmm/
You will also need to copy the recognition script from lab to
whichever directory on your own computer you are using for the
assignment. The recognition script lives in
/proj/speech/users/cs4706/pasr/recognize_wav.py
Please note that while these instructions are provided for your convenience for working on the project at home, you are still responsible for making sure that your scripts run on the Speech Lab machines by the submission deadline.