This closely follows this but also includes the Pi dependencies:
sudo apt-get install swig oss-compat pulseaudio libpulse-dev automake autoconf libtool bison python-devMy benchmarks
For all benchmarks I recorded one file using
arecord -f S16_LE -c1 -r16000 goforward.rawTranscribe Audio
time pocketsphinx_continuous -fwdflat no -bestpath no -maxwpf 5 -maxhmmpf 10000 -topn 2 -pl_window 7 -infile goforward.rawIntel(R) Core(TM) i5 to 4310U CPU @ 2.00GHz: ~1 to 2 second for 2 seconds audio
Raspberry Pi 2: ~7 to 8 seconds for 2 seconds audio
Transcribe Audio (limited dictionary)
Make a dictionary first. Generate a file language.txt with some words, like
open browser
new e-mail
forward
backward
next window
last window
open music player
okay computerthen go generate a dictionary by uploading language.txt. Download the resulting tar and use tar -xvzf TAR*.tgz and then use the command:
time pocketsphinx_continuous -fwdflat no -bestpath no -maxwpf 5 -maxhmmpf 1000 -topn 2 -pl_window 7 -dict 4182.dic -lm 4182.lm -infile goforward.rawIntel(R) Core(TM) i5 to 4310U CPU @ 2.00GHz: ~0.1 seconds
Raspberry Pi 2: ~1.4 seconds
Keyword search
pocketsphinx_continuous -kws phrases.kws -kws_threshold 1e-20 -infile goforward.rawwhere phrases.kws has a couple of phrases to look for.
Intel(R) Core(TM) i5 to 4310U CPU @ 2.00GHz: ~0.25 seconds
Raspberry Pi 2: ~2.5 seconds
Download
git clone https://github.com/cmusphinx/sphinxbase.git
git clone https://github.com/cmusphinx/pocketsphinxConfigure and Install Pocketsphinx
cd sphinxbase./autogen.sh./configure
make && sudo make installAdd the following to ~/.profile:
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfigthen
source ~/.profile
cd../
cd pocketsphinx./autogen.sh
make && sudo make installReference shelf
A short shelf of sources and related reading. Opens in a new tab.
