-1

im developing an application that uses CMU Sphinx4, but when i trying to run PythonTranscriber the following error occurs:

[root@karen python]# java -cp /home/karen/jython2.5/jython.jar:$CLASSPATH org.python.util.jython PythonTranscriber.py 
Traceback (most recent call last):
  File "PythonTranscriber.py", line 36, in <module>
    from edu.cmu.sphinx.jsapi import JSGFGrammar
ImportError: No module named jsapi

i noticed that the directory :"/home/karen/sphinx4-1.0beta5-scr2/sphinx4-1.0beta/lib" does not have the jsapi.jar. i tried to look for it in another directory but i can not find it.

How can i get jsapi.jar inside the directory :"/home/karen/sphinx4-1.0beta5-scr2/sphinx4-1.0beta/lib" it supposed to be there! Please help!

barryhunter
  • 20,886
  • 3
  • 30
  • 43
karensantana
  • 1,599
  • 4
  • 21
  • 34

3 Answers3

2

It appears that it comes with Sphinx-4. See this installation tutorial.

The basic instructions:

Download the Sphinx-4 1.0beta4 package from SourceForge.

Then, run the following:

unzip sphinx4-1.0beta4-bin.zip
cd sphinx4-1.0beta4-bin/lib
sh jsapi.sh

You'll need to accept the BCL license agreement which appears on the screen (scroll to the end, and then press 'y') which will unpack jsapi.jar.

David C
  • 7,204
  • 5
  • 46
  • 65
  • when i trying to accept the BCL : 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 my installation fails or is ok? – karensantana Nov 16 '12 at 13:56
0

After bit of Googling around (and cursing) I ended up at:

http://www.oracle.com/technetwork/java/jsapifaq-135248.html#implementation

which points you to a list of folks who provide implementations of the JSAPI.

John Gaines Jr.
  • 11,174
  • 1
  • 25
  • 25
0

I have faced the same error. All you have to do is install sharutils. In my case, I was using Redhat 6, so 'sudo yum install sharutils' should install sharutils and you should be able to run 'sh jsapi.sh' with out any errors.