Create a dictionary file containing all the words that will be used. You can use the CMU Sphinx Pronouncing Dictionary to get the phonemes for English dictionary words.
CAT K AE T DOG D AO G FISH F IH SH
Create a keyphrase list file with a threshold for each phrase. Defaults to
1. Lower thresholds increase the number of matches but might also increase the number of false alarms.
CAT /1e-15/ DOG /1e-15/ FISH /1e-12/
pocketsphinx_continuous command with microphone as input:
pocketsphinx_continuous -inmic yes -kws keyphrase.list -dict keyphrase.dic
Or you can you a specified audio file:
pocketsphinx_continuous -infile dog.wav -kws keyphrase.list -dict keyphrase.dict
Use sox to record audio files from the command line:
sox -d -c 1 -r 16000 -e signed -b 16 dog.wav