Keyword or keyphrase spotting with Sphinx4

后端 未结 1 1710
青春惊慌失措
青春惊慌失措 2021-01-06 16:41

I am currently trying to make my java code (using eclipse) perform some function if a certain thing is said. I am using the Sphinx4 libraries and this is what I currently ha

相关标签:
1条回答
  • 2021-01-06 17:32

    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

    0 讨论(0)
提交回复
热议问题