I have a pocketsphinx installed on Raspberry Pi and a microphone connected to it. When i run pocketsphinx_continuous using command
pocketsphinx_continuous -inmic yes -dict dict.dict -hmm /home/pi/zero_ru.cd_cont_4000 -jsgf mygrammar.gram
it starts to recognize random phrases (but in most cases the same phrase) when I am not speaking. And when I do, result is the same. I use acoustic model for russian language. Please, need your help.
You need to use keyword spotting mode.
Pocketsphinx supports keyword spotting mode where you can specify the keyword list to look for. The advantage of this mode is that you can specify a threshold for each keyword so that keyword can be detected in continuous speech. All other modes will try to detect the words from grammar even if you used words which are not in grammar. The keyword list looks like this:
oh mighty computer /1e-40/
hello world /1e-30/
other phrase /1e-20/
To run pocketsphinx with keyword list use:
pocketsphinx_continuous -inmic yes -dict dict.dict -hmm /home/pi/zero_ru.cd_cont_4000 -kws keyword.list
Threshold must be specified for every keyphrase. For shorter keyphrase you can use smaller thresholds like 1e-1, for longer threshold must be bigger. Threshold must be tuned to balance between false alarms and missed detections, the best way to tune threshold is to use a prerecorded audio file.
For the best accuracy it is better to have keyphrase with 3-4 syllables. Too short phrases are easily confused.