Hello World Decoder QuickStart Guide Pt 2

From Sphinx

Contents

Goals

  • Use a custom-built language model
  • Use a custom-built dictionary

Create a corpus

Create a local file

hello
please
yellow

Generate language model / dictionary

Go to lmtool and upload it

Download the language model and dictionary files.

Manually hack the language model to add a newline after \end\

Fix dictionary phonemes

Unfortunately, the online LM tool generates phonemes that are slightly incompatible with ... I guess they are incompatible with the acoustic models. If you try it now, it will complain about the AX phoneme and abort.

Use fixdict py python script to fix it up, or just do it by hand. Check the script and the substitutions that need to be done are obvious.

Here is the fixed dictionary:

HELLO	HH AH L OW
HELLO(2)	HH EH L OW
PLEASE	P L IY Z
YELLOW	Y EH L OW

Convert to binary dump

This is done in exactly the same way as part 1 of the tutorial.

Modify config file

  • Point -lm to new language model binary dump
  • Point -dict to new dictionary

Run

This is done in exactly the same way as part 1 of the tutorial.

Output

FWDVIT: (helloaudio) 
FWDVIT: PLEASE (pleaseaudio)  
FWDVIT: YELLOW (yellowaudio)

Part 3: Using a different Acoustic model

Sphinx3 Speech Recognition Quick Start - Part 3

related