Hi, I'm using my Raspberry Pi 3 for a smart home project wich uses jasper and pocketsphinx for speech recognition. So far I managed to get everything up and running but I can't really figure out how to make it recognize other languages than English (German in my case). I know that I need a acoustic model and a language model wich I found in the download section, but I don't know wich files i need, how install them and how to tell pocketsphinx to use them.
It's hard to find a solution to this for me because I'm rather new to linux and speech recognition. In addition to that comes that many of the threads about this topic are pretty old and some of the (important?) links in them are not workling anymore.
A step by step manual would be perfect, although not necessary, I appreciate every help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
jasper-dev version support geman language. Unfortunatly no document available for it and you need to dig into code yourself for more info.
you need german acoustic model and g2p (fst) model, language model is not required as jasper generate one for you.
Try German Acoustic Model (voxforge.cd_cont_3000) voxforge-de-r20141117.tgz
with g2p model dict-xsampa.fst
jasper configuration for this is as follows:
stt_engine:sphinxpocketsphinx:fst_model:'<fst path>/dict-xsampa.fst'hmm_dir:'<acoustic model path>/model_parameters/voxforge.cd_cont_3000'fst_model_alphabet:'xsampa'
Hi, thx for the fast reply. I tryed g2p model from dropbox with voxforge-de-r20140216 but i get this error when executing jasper:
********************************************************JASPER-THETALKINGCOMPUTER**(c)2015ShubhroSaha,CharlieMarsh&JanHolthuis********************************************************ERROR:root:Erroroccured!Traceback(mostrecentcalllast):File"jasper.py",line146,in<module>app=Jasper()File"jasper.py",line109,in__init__stt_passive_engine_class.get_passive_instance(),File"/home/pi/jasper/client/stt.py",line48,inget_passive_instancereturncls.get_instance('keyword',phrases)File"/home/pi/jasper/client/stt.py",line42,inget_instanceinstance=cls(**config)File"/home/pi/jasper/client/stt.py",line90,in__init__importpocketsphinxaspsFile"/usr/local/lib/python2.7/dist-packages/pocketsphinx/__init__.py",line37,in<module>frompocketsphinximport*File"/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py",line42,in<module>_pocketsphinx=swig_import_helper()File"/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py",line38,inswig_import_helper_mod=imp.load_module('_pocketsphinx',fp,pathname,description)ImportError:libpocketsphinx.so.3:cannotopensharedobjectfile:NosuchfileordirectoryExceptionAttributeError:"'PocketSphinxSTT' object has no attribute '_logfile'"in<boundmethodPocketSphinxSTT.__del__of<client.stt.PocketSphinxSTTobjectat0x75bc2ed0>>ignored
It might work with dict-xsampa.fst, where can i find it?
Also voxforge.cd_cont_3000 is now voxforge.cd_cont_4000, does that matter?
Last edit: GeneralG 2017-06-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I deleted jasper and pocketsphinx completely and set up the profile with the new models, but i still get this error:
ERROR:root:Erroroccured!Traceback(mostrecentcalllast):File"jasper.py",line146,in<module>app=Jasper()File"jasper.py",line109,in__init__stt_passive_engine_class.get_passive_instance(),File"/home/pi/jasper/client/stt.py",line48,inget_passive_instancereturncls.get_instance('keyword',phrases)File"/home/pi/jasper/client/stt.py",line42,inget_instanceinstance=cls(**config)File"/home/pi/jasper/client/stt.py",line90,in__init__importpocketsphinxaspsFile"/usr/local/lib/python2.7/dist-packages/pocketsphinx/__init__.py",line37,in<module>frompocketsphinximport*File"/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py",line42,in<module>_pocketsphinx=swig_import_helper()File"/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py",line38,inswig_import_helper_mod=imp.load_module('_pocketsphinx',fp,pathname,description)ImportError:/usr/local/lib/libpocketsphinx.so.3:undefinedsymbol:fe_get_vad_stateExceptionAttributeError:"'PocketSphinxSTT' object has no attribute '_logfile'"in<boundmethodPocketSphinxSTT.__del__of<client.stt.PocketSphinxSTTobjectat0x75c59c10>>ignored
Even thou this might wonder off topic a bit, do you have and idea what to do?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok, I'm using sphinxbase-0.8 at the moment but I can't find a newer version. Should i use the sphinxbase-5prealphaand how can I tell Jasper to use it? And if not how do I update my current version or where can I get the New verion?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pocketsphinx-5prealpha is not supported by jasper-master.
better use jasper-dev branch. checkout and install pocketsphinx-5prealpha from github https://github.com/cmusphinx.
and use following config with jasper-dev
I couldn't make Jasper work with pocketsphinx 5prealpha so I decided to compleatly reinstall Raspbian. Now I'm trying to run Jasper with pocketsphinx0.8 and the new models from github you posted and even thou Jasper starts nothing happens after the "welcome" message. I'm not even getting an error message. Do you have an Idea where that comes from? Or as I'm rather new to speech recognition do you know a good guide for installing the prealpha?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm using my Raspberry Pi 3 for a smart home project wich uses jasper and pocketsphinx for speech recognition. So far I managed to get everything up and running but I can't really figure out how to make it recognize other languages than English (German in my case). I know that I need a acoustic model and a language model wich I found in the download section, but I don't know wich files i need, how install them and how to tell pocketsphinx to use them.
It's hard to find a solution to this for me because I'm rather new to linux and speech recognition. In addition to that comes that many of the threads about this topic are pretty old and some of the (important?) links in them are not workling anymore.
A step by step manual would be perfect, although not necessary, I appreciate every help.
jasper-dev version support geman language. Unfortunatly no document available for it and you need to dig into code yourself for more info.
you need german acoustic model and g2p (fst) model, language model is not required as jasper generate one for you.
Try German Acoustic Model (voxforge.cd_cont_3000)
voxforge-de-r20141117.tgz
with g2p model
dict-xsampa.fst
jasper configuration for this is as follows:
If you are using jasper-master version then
Try German Acoustic Model (voxforge.cd_cont_3000)
voxforge-de-r20141117.tgz
with g2p model voxforge-de.fst, download it from
https://www.dropbox.com/s/vbkf8qjvsf67b66/voxforge-de.fst?dl=0
jasper configuration for this is as follows:
Note:- seems voxforge-de-r20141117.tgz is not available anymore, you can try
http://www.repository.voxforge1.org/downloads/de/Tags/AcousticModels/voxforge-de-r20140216.tgz
Hi, thx for the fast reply. I tryed g2p model from dropbox with voxforge-de-r20140216 but i get this error when executing jasper:
It might work with dict-xsampa.fst, where can i find it?
Also voxforge.cd_cont_3000 is now voxforge.cd_cont_4000, does that matter?
Last edit: GeneralG 2017-06-13
You are using jasper-master version, dict-xsampa.fst will not work with it.
Error seems not related to acoustic model and g2p model. Try to run Jasper with
--debug
flag for detailed error messages.Check Jasper installation doc for Pocketsphinx version and installation for jasper-master version.
You can try
voxforge.cd_cont_4000
and see if it make any difference.I deleted jasper and pocketsphinx completely and set up the profile with the new models, but i still get this error:
Even thou this might wonder off topic a bit, do you have and idea what to do?
Your version of sphinxbase is too old.
ok, I'm using sphinxbase-0.8 at the moment but I can't find a newer version. Should i use the sphinxbase-5prealphaand how can I tell Jasper to use it? And if not how do I update my current version or where can I get the New verion?
pocketsphinx-5prealpha is not supported by jasper-master.
better use jasper-dev branch. checkout and install pocketsphinx-5prealpha from github https://github.com/cmusphinx.
and use following config with jasper-dev
Alternatively download German g2p and acoustic models from
https://github.com/G10DRAS/German-G2P-and-Acoustic-Model
and pre-compiled Sphinxbase and Pocketsphinx 5prealpha raspbian jessie .deb pkg from
https://github.com/G10DRAS/Raspbian-Jessie-Pkgs
I couldn't make Jasper work with pocketsphinx 5prealpha so I decided to compleatly reinstall Raspbian. Now I'm trying to run Jasper with pocketsphinx0.8 and the new models from github you posted and even thou Jasper starts nothing happens after the "welcome" message. I'm not even getting an error message. Do you have an Idea where that comes from? Or as I'm rather new to speech recognition do you know a good guide for installing the prealpha?