Keyword or keyphrase spotting with Sphinx4

廉价感情. 提交于 2019-11-30 23:53:29

You can do that but the only thing is that you need to enable OOG spotting in sphinx4. Basically take any sphinx4 grammar example and enable OOG according to this wiki page in config file:

<component name="flatLinguist"
           type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
     ....
    <property name="addOutOfGrammarBranch" value="true"/>
    <property name="outOfGrammarProbability" value="1E-20"/>
    <property name="phoneInsertionProbability" value="1E-10"/>
    <property name="phoneLoopAcousticModel" value="wsj"/>
     ...
</component>

After that it will return you <unk> word as a result if just random word is recorded and will return you a key phrase if the word from your grammar is recorded.

You need to tune outOfGrammar probability to get a reliable detection. For more details see

http://cmusphinx.sourceforge.net/wiki/sphinx4:rejectionhandling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!