-->

hypothesis parameter pocketsphinx

2019-03-02 07:41发布

问题:

I use Pocketsphinx in my Android app. I recognize speech using addGrammarSearch (String name, File file). When there is noise around, then Pocketsphinx catches it and recognizes it as a word or phrase from the grammar. But the word was not uttered. Is there any parameter in the hypothesis, which shows how much the recognized sound is like a word from a grammar? What method can I get this parameter? I want to filter out the recognized sound, which has a low value, that is, it does not look like a word in the grammar.

回答1:

This answer has an approach you may find useful -- that is, if you can tolerate using a keyword list instead of a full grammar. (Note that keywords do not have to be single words.) With SpeechRecognizer.addKeywordSearch(), you can set "thresholds" for each keyword, which is critical to reducing false positives.

The thresholds are usually found via experimentation. The closer it is to 1e-50, the more likely you are to get a false positive. The closer it is to 1e0, the more likely you are to miss a valid utterance.