Sphinx and speech recognition module
Installing Sphinx and speech recognition module
#1 Updated by msunardi over 6 years ago
First issue during installation:
- Setting up JSAPI (as documented here: http://cmusphinx.sourceforge.net/sphinx4/doc/jsapi_setup.html) returned error when accepting the Binary Code License (BCL) agreement, with message:
Accept (y/n)?: y
x - creating lock directory
x - extracting jsapi.jar (binary) jsapi.sh: line 257: uudecode: command not found
restore of jsapi.jar failed
jsapi.jar: MD5 check failed
#2 Updated by msunardi over 6 years ago
Sphinx website for documentation and installation instructions: http://cmusphinx.sourceforge.net/sphinx4/#download_and_install
#3 Updated by msunardi over 6 years ago
- EDITED *** Use java-1.6.0-openjdk-i386 instead. The 1.7.0 didn't work well on Ubuntu 12.04 for some reason - i could be wrong.
Next possible pitfall is finding your JAVA_HOME and ANT_HOME folders when building Sphinx.
In the onboard PC, I installed Java and Ant using:
~$ sudo apt-get install openjdk-6-jdk openjdk-6-jre
~$ sudo apt-get install ant
The location of these are:
~$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-i386
~$ export ANT_HOME=/usr/share/ant
Then add these locations to your PATH variable:
~$ export PATH=/usr/lib/jvm/java-1.7.0-openjdk-i386/bin:/usr/share/ant/bin:$PATH
*Don't forget to add the :$PATH at the end of the last line.
#4 Updated by msunardi over 6 years ago
- cd to the directory where you extracted sphinx. E.g.
~$ cd sphinx-4.0beta6/
- Install using ant:
- (optional) if you want to also build the javadocs, do:
sphinx-4.0beta6~$ ant javadocs
You'll also need the jsapi.jar. Build it using the instructions from here
Executing "Ant" will create the .jar files in the
lib/ directory inside the sphinx directory. You will need these .jar's for your speech recognition program.
Here's a good tutorial on YouTube on how to use/install sphinx on linux: Speech Recognizer (Sphinx 4) in Java on Linux