Bug #3529

Sphinx and speech recognition module

Added by msunardi about 7 years ago. Updated over 6 years ago.

Start date:
Due date:
% Done:


Estimated time:
3.00 h
Spent time:


Installing Sphinx and speech recognition module


#1 Updated by msunardi about 7 years ago

First issue during installation:
- Setting up JSAPI (as documented here: 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) line 257: uudecode: command not found
restore of jsapi.jar failed
jsapi.jar: MD5 check failed


#2 Updated by msunardi about 7 years ago

Sphinx website for documentation and installation instructions:

#3 Updated by msunardi about 7 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 about 7 years ago

To install sphinx:
  1. cd to the directory where you extracted sphinx. E.g. ~$ cd sphinx-4.0beta6/
  2. Install using ant: sphinx-4.0beta6~$ ant
  3. (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

#5 Updated by Anonymous over 6 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF