Menu

Pocketsphinx on Rpi2: Continuous_test.py error

Help
2016-12-14
2016-12-14
  • Aleksandar Micakovic

    Hello,

    I try to run pocketsphinx on a Pi2, for spech recognition udner Python
    I downloaded and installed sphinxbase and pocketsphinx (5prealpha) like:
    ./configure
    make
    sudo make install
    export LD_LIBRARY_PATH=/usr/local/lib
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

    I wanted to test it with
    https://github.com/cmusphinx/pocketsphinx/blob/master/swig/python/test/continuous_test.py

    And it throws following Error (I renamed the file to cont_test.py):
    Traceback (most recent call last):
    File "cont_test.py", line 16, in <module>
    decoder = Decoder(config)
    File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 266, in init
    this = _pocketsphinx.new_Decoder(*args)
    RuntimeError: new_Decoder returned -1

    What is the Issue? Please Help?

     
    • Nickolay V. Shmyrev

      What is the Issue?

      You tried to run the code without even looking inside. It didn't find model files on the path specified and failed due to that.

      Please Help?

      Specify proper path to the model folder in the code.

       
  • Aleksandar Micakovic

    Oh sorry I didnt mention that i did change the code to:
    MODELDIR = "~/pocketsphinx-5prealpha/model"
    DATADIR = "~/pocketsphinx-5prealpha/test/data"

    Of course I did look at the code (to learn from it) and changed the paths accordingly.

    P.S.: Thank you for your help.

     

    Last edit: Aleksandar Micakovic 2016-12-14
    • Nickolay V. Shmyrev

      FYI, ~ symbol is only processed by the bash in command line, it is not expanded in the code. You need to specify full absolute path if you are not sure about relative path.

       
  • Aleksandar Micakovic

    Thank you Nickolay,

    with full path it works.

    Im sorry you have to bother around with uninformed guys like myself,
    After years of windows based systems and .net I just recently(2 weeks ago) began to
    learn to work with linux.

    Thanks for the Help.

     

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.