The probability of recognition results is always 0.
I am using Pocketsphinx for Android.
recognizer = defaultSetup() .setAcousticModel(new File(assetsDir, "en-us-ptm")) .setDictionary(new File(assetsDir, "cmudict-en-us.dict") .setRawLogDir(assetsDir) .setKeywordThreshold(1e-15f) .setBoolean("-allphone_ci", true) .getRecognizer(); recognizer.addListener(this);
Then I am trying to get probability of results and it always returns 0.
public void onResult(Hypothesis hypothesis) { Log.i(LOG_TAG, "1prob " + hypothesis.getProb() ); }
How can I get the right value of probability?
It depends on the search type you are using.
I am using a grammar search.
File fieldGrammar = new File(assetsDir, "keywords.gram"); recognizer.addGrammarSearch(KEYWORD_SEARCH, keywordsGrammar);
What search type should I use to get probability results?
Confidence is not supported for grammar searches. Only in keyword or language model searches.
Log in to post a comment.
The probability of recognition results is always 0.
I am using Pocketsphinx for Android.
Then I am trying to get probability of results and it always returns 0.
How can I get the right value of probability?
It depends on the search type you are using.
I am using a grammar search.
File fieldGrammar = new File(assetsDir, "keywords.gram");
recognizer.addGrammarSearch(KEYWORD_SEARCH, keywordsGrammar);
What search type should I use to get probability results?
Confidence is not supported for grammar searches. Only in keyword or language model searches.