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
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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.
Specify proper path to the model folder in the code.
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
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.
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.