Menu

how to run HelloDigits

Help
2009-10-31
2012-09-22
  • Jan Markowski

    Jan Markowski - 2009-10-31

    Hello!

    I completed the tutorial http://www.speech.cs.cmu.edu/sphinx/tutorial.html in Ubuntu Linux (compiling,
    executing perl scripts). I skimmed all the docs in an4 and sphinx3
    directories, however those docs were about acoustic and language models,
    training and so on. I expected to find here http://www.speech.cs.cmu.edu/sphi
    nxman/FAQ.html
    question like
    "How to run examplary application" but there was no. I also looked
    for files containing "hello" in the name but there were no founds.

    In general I'd like to run on my laptop examplary application which uses CMU
    Sphinx recognition, beginning with the easiest (I guess the easiest because
    explained in the tutorial) Sphinx3, then Sphinx4 (just to check it) - both on
    laptop. And finally I'd like to run HelloDigits or other example with use of
    PocketSphinx on mobile phone.

    Can you help me, please?
    Greetings!

     
  • Jan Markowski

    Jan Markowski - 2009-11-02

    Hello!

    Can anybody tell me, please, what may be the reason that HelloWorld doesn't
    work?

    mainacc@mainacc-laptop:~/tutorial/sphinx4-1.0beta3-bin/sphinx4-1.0beta3$ java
    -mx256m -jar bin/HelloWorld.jar

    Exception in thread "main" java.lang.NoClassDefFoundError:
    javax/speech/recognition/GrammarException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at edu.cmu.sphinx.util.props.ConfigurationManager.getPropertySheet(Configurati
    onManager.java:89)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:278)
    at
    edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.java:173)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
    at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProperties
    (SimpleBreadthFirstSearchManager.java:145)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
    at
    edu.cmu.sphinx.decoder.AbstractDecoder.newProperties(AbstractDecoder.java:52)
    at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:31)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
    at
    edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:280)
    at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:78)
    at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:430)
    at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationManager.
    java:163)
    at edu.cmu.sphinx.demo.helloworld.HelloWorld.main(HelloWorld.java:36)
    Caused by: java.lang.ClassNotFoundException:
    javax.speech.recognition.GrammarException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 18 more
    mainacc@mainacc-laptop:~/tutorial/sphinx4-1.0beta3-bin/sphinx4-1.0beta3$

    In general I followed the tutorial and then configured Java by following this:

    mainacc@mainacc-laptop:~$ echo "export
    PATH=\$PATH:/usr/local/jdk1.6.0_16/bin" >> ~/.bashrc
    mainacc@mainacc-laptop:~$ . ~/.bashrc

    Later I tried to execute java -mx256m -jar bin/HelloWorld.jar but there were
    some errors as explained at the beginning in the output of terminal.

    Greetings :-)!

     
  • Nickolay V. Shmyrev

    Dear johnyjj2, you forgot to unpack jsapi. Please follow installation
    documentation carefully.

     
  • Jan Markowski

    Jan Markowski - 2009-11-05

    Thanks for answer :-)!

    I was looking for documentation about PocketSphinx and this is what I found
    useful:
    http://www.speech.cs.cmu.edu/cmusphinx/moinmoin/GStreamer
    http://www.speech.cs.cmu.edu/cmusphinx/moinmoin/PocketSphinxMigration#head-d9
    61320974162ecddad3eaf4b113d4e2ab4a81ea

    http://cmusphinx.sourceforge.net/sphinx4/src/apps/edu/cmu/sphinx/demo/hellowo
    rld/README.html

    I also began reading "A Tutorial on Hidden Markov Models" by Lawrence R.
    Rabiner and I find it a little bit difficult but also interesting.

    In general I installed PocketSphinx in Ubuntu 9.10. I'd like to run examplary
    applications. Link gives information about building and running HelloWorld.jar
    for Sphinx4, I don't see any .jar files like this in the directory of
    PocketSphinx. Somebody wrote that examples are in the directory
    pocketsphinx-0.5.1/scripts, e.g. pocketsphinx_tidigits. OK, but how to run it?
    The link gives information about recognizing .raw file so the input isn't
    real-time speech. And link looks the best, however it still doesn't explain
    running demos with PocketSphinx. I also looked at content of
    pocketsphinx-0.5.1/doc directory but there are no html or readme files there.

    Greetings :-)!

    PS It wasn't that I forgot to do what was in jsapi-install.html. I didn't
    notice the error caused by it. After all I installed it in the following way:
    1. install JDK 6 Update 16 with NetBeans 6.7.1
    2. echo "export PATH=\$PATH:/usr/local/jdk1.6.0_16/bin" >> ~/.bashrc
    . ~/.bashrc
    3. enter SphinxBase directory, after unpacking
    4. sudo make clean //after previous improper installation
    5. dpkg --get-selections | grep python
    6. sudo apt-get install python2.6-dev //it downloaded and installed the file
    7. ./configure
    8. make
    6. sudo make install
    7. enter directory of PocketSphinx and install it with ./configure, make, sudo make install

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.