本文介绍了Pocketsphinx 在沉默中识别随机短语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Raspberry Pi 上安装了一个 Pocketsphinx,并连接了一个麦克风.当我使用命令运行 pocketsphinx_continuous 时

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 支持关键字发现模式,您可以在其中指定要查找的关键字列表.这种模式的优点是可以为每个关键字指定一个阈值,以便在连续语音中检测到关键字.即使您使用了不在语法中的单词,所有其他模式也会尝试从语法中检测单词.关键字列表如下所示:

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/

使用关键字列表运行pocketsphinx:

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

必须为每个关键短语指定阈值.对于较短的关键短语,您可以使用较小的阈值,例如 1e-1,对于较长的阈值必须更大.必须调整阈值以平衡误报和漏检,调整阈值的最佳方法是使用预先录制的音频文件.

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.

为了获得最佳准确性,最好使用 3-4 个音节的关键短语.太短的短语很容易混淆.

For the best accuracy it is better to have keyphrase with 3-4 syllables. Too short phrases are easily confused.

这篇关于Pocketsphinx 在沉默中识别随机短语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 07:22