Menu

Pocketsphinx Android doesn't return probability. It is always 0.

Help
2015-07-23
2015-07-27
  • Yuri Kobets

    Yuri Kobets - 2015-07-23

    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?

     
    • Nickolay V. Shmyrev

      It depends on the search type you are using.

       
      • Yuri Kobets

        Yuri Kobets - 2015-07-27

        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?

         
        • Nickolay V. Shmyrev

          Confidence is not supported for grammar searches. Only in keyword or language model searches.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.