3

I wanted to know what the number/score associated with a hypothesis mean. In my recognized result, it is usually a negative number with a magnitude of tens of thousand. For example, a decoded hypothesis may look like "What is an apple" with an score being -70021. So I wonder if this score indicates the accuracy/confidence of the hypothesis. I have observed that this number could take a range of negative numbers, which doesn't seem to be related to confidence/probability/accuracy of decoded result. If it doesn't indicate the confidence, how can I set a threshold to hypothesis so that inaccurate result would be filtered out and prompting users for a repetition of his speech

ps. I am using pocketsphinx on Android. I get the score via calling decoder.hyp().getBestScore()

hatfinch
  • 3,095
  • 24
  • 35
Daniel
  • 1,484
  • 5
  • 24
  • 42

1 Answers1

4

So I wonder if this score indicates the accuracy/confidence of the hypothesis.

Score is the log-scale score of the audio matching the model (estimate of the audio generated by the model). It has nothing to do with accuracy and/or confidence. Confidence is available with ps_get_prob API call.

I have observed that this number could take a range of negative numbers, which doesn't seem to be related to confidence/probability/accuracy of decoded result.

The numbers are negative because they are logarithm of a probability.

If it doesn't indicate the confidence, how can I set a threshold to hypothesis so that inaccurate result would be filtered out and prompting users for a repetition of his speech

Threshold for verification of the keyphrase could be set with keyword spotting search implemented in subversion (branches/kws) and to be released soon. To enable it you need to set configuration -kws "phrase" -kws_threshold threshold.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87