Mosa
Mosa

Reputation: 393

PocketSphinx: Getting the probabilities of the words

I use PocketSphinx to do voice recognition. For example I use a language model like this:

I say "Hello world", now I want the list of the probabilities/scores of the recognition. Like for the first word "Hello" a possible match could be:

I don't know how PocketSphinx represents the probabilities. It is only an example. Has someone a clue?

Thanks

Mosa

Upvotes: 0

Views: 2212

Answers (1)

Nikolay Shmyrev
Nikolay Shmyrev

Reputation: 25210

You can retrieve individual segments of hypothesis with iterator:

 print 'Best hypothesis segments: ', [(seg.word, seg.prob) for seg in decoder.seg()]

seg.prob contains the confidence score. To have a meaningful confidence score you need to make sure your language model is large enough.

For small single phrase spotting it's better to use keyword spotting mode.

Upvotes: 3

Related Questions