Monday, January 23, 2017

Arduino + Speech Recognition (Annyang / Jasper/pocketsphinx)



Introduction





Requirements:




Procedures:

sudo apt-get install git
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install bison
sudo apt-get install python-dev
sudo apt-get install swig
sudo apt-get install make
sudo apt-get install pkg-config
git clone https://github.com/cmusphinx/sphinxbase.git
cd sphinxbase
./autogen.sh
make
sudo make install
cd ..
git clone git://github.com/cmusphinx/pocketsphinx.git
cd pocketsphinx
./autogen.sh
make
sudo make install
cd ..

sudo apt-get install ffmpeg

Using PocketSphinx
Now just upload a wav file to your working directory. Note: Wave file needs to be mono channel, normalized, and 16000 sample rate.

Use this to convert quickly online: http://audio.online-convert.com/convert-to-wav


ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 output.wav

To convert all mp3 files in a directory in Linux:
for f in *.mp3; do ffmpeg -i "$f" -acodec pcm_s16le -ac 1 -ar 16000 "${f%.mp3}.wav"; \


Without Timing

pocketsphinx_continuous -infile sample.wav > decode-result.txt
With Timing

pocketsphinx_continuous -time yes -infile sample.wav > decode-result.txt

Methodology








Remarks




Conclusions:

1 comment:

  1. As stated by Stanford Medical, It is really the SINGLE reason women in this country live 10 years more and weigh an average of 42 lbs lighter than us.

    (And realistically, it has absolutely NOTHING to do with genetics or some secret diet and really, EVERYTHING about "how" they eat.)

    BTW, What I said is "HOW", and not "WHAT"...

    Click this link to see if this easy test can help you unlock your real weight loss potential

    ReplyDelete