Pocketsphinx - Adding words and Improving accuracy

Mike6679 picture Mike6679 · Dec 26, 2010 · Viewed 19.2k times · Source

I've managed to finally build and run pocketsphinx (pocketsphinx_continuous). The problem I'm running into, is how to a improve accuracy. From what I understand, you can specify a dictionary file (-dict test.dic). So I took the default dictionary file and added some more pronunciations of the same words, for example:

pencil P EH N S AH L
pencil(2) P EH N S IH L

spaghetti S P AH G EH T IY
spaghetti(2) S P UH G EH T IY

Yet pocketsphinx still does not recognize either word at all. I know there is a jsgf file you can specify as well , but that seems more for phrases and grammar. How can I get pocketsphinx to recognize common words such as pencil and spaghetti?

thanks

-Mike

Answer

Jeremy Salwen picture Jeremy Salwen · May 18, 2011

With something like this, you can't be certain, but I can offer the following suggestions:

  1. Perhaps the language model somehow has low probabilities for "spaghetti" and "pencil". As you suggested, you could use a JSGF to test out how it does for recognition if it doesn't use the N-gram models, but instead does a simple grammar (give it like twenty words, including spaghetti and pencil). This way you can see if it is perhaps the language model which makes it difficult to recognize these words, and it can do okay if it considers all the words to have equal probability.

  2. Perhaps you simply pronounce these words poorly, even with the alternative dictionary entries. Try either A. Testing other peoples' voices, or B. Adapting the acoustic model to your voice (see http://cmusphinx.sourceforge.net/wiki/tutorialam)

  3. Also, what is it recognizing them as when it is failing? If possible, remove the words it misrecognizes as from the dictionary.

Again, for overall accuracy, only three things are going to really help you: restricting the grammar, adapting the accoustic model, and perhaps getting higher quality recording input.