Search code examples
python-2.7speech-recognitionspeech-to-textcmusphinx

Pocketsphinx decoder adds words of its own


I am using Ubuntu 12.04, Python 2.7 & PocketSphinx.

I made a custom dictionary, language model using online LM tool. Using pocketsphinx_continous to decode the spoken voice gives me 100% accuracy. But using PyAudioto record sound in Python recognises the text but adds 'A' and 'AND' with the main context as shown in the images below PocketSphinx_Continuous PocketSphinx in Python How to cure it?


Solution

  • The reason for the reduced accuracy is that you've added an artifical zero-silenced region around the utterance and that corrupts spectrum and reduces accuracy. Stop doing that. Instead, just recognize the sound you have recorded.

    If you still need to decode zero-silenced regions, you need to add

     dither="yes"
    

    option in decoder arguments in order to let decoder work around them. Once you add this option result will be accurate.