Hello!
I'm using shpinx for speech recognition for my graduation project ''Home automation''.
I'm facing a problem when I speak, the sphinx doesn't show my words, it stopped at ready or listening.
I followed a book called Respberry pi robotic projects by ''Richard Grimmett''to install the spinx library.
I think the installing process made this problem, so what's the solution??
I'm running out of the time. so, please if you can help me, don't hesitate to contact me back.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Assuming you have a usb microphone plugged into the pi, run "arecord -l" to make sure there is only one audio input device. Then, you can use "-adcdev plughw:N,M on the pocketsphinx_continous command line to make sure you're using the device you think.
N,M is the card# and subdevice# in the arecord-l output.
HTH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use this (in a bash script) to do a sphinxbase/pocketsphinx build
# Get some needed packages:
sudo apt-get install -y bison swig
# Download sphinxbase:
wget https://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/sphinxbase-5prealpha.tar.gz
gunzip sphinxbase-5prealpha.tar.gz
tar -xvf sphinxbase-5prealpha.tar
mv sphinxbase-5prealpha sphinxbase
# Build sphinxbase:
cd sphinxbase
./autogen.sh
./configure
make
sudo make install
cd -
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# Download pocketsphinx:
wget https://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/pocketsphinx-5prealpha.tar.gz
gunzip pocketsphinx-5prealpha.tar.gz
tar -xvf pocketsphinx-5prealpha.tar
# Build pocketsphinx:
cd pocketsphinx-5prealpha
./autogen.sh
./configure
make
sudo make install
cd -
echo "####### Done Installation ################"
echo "To test the installation, run:"
echo " pocketsphinx_continuous -inmic yes -adcdev plughw:M,N"
echo " and check that it recognizes words you speak into your microphone."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Everything seemed okey , I reinstall it and it works fine.
but the problem is that when I download the continuous.file and change some codes in it in order to interprit commands to actions, it shows me the previous error again!!!
any solutions??
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I'm using shpinx for speech recognition for my graduation project ''Home automation''.
I'm facing a problem when I speak, the sphinx doesn't show my words, it stopped at ready or listening.
I followed a book called Respberry pi robotic projects by ''Richard Grimmett''to install the spinx library.
I think the installing process made this problem, so what's the solution??
I'm running out of the time. so, please if you can help me, don't hesitate to contact me back.
Assuming you have a usb microphone plugged into the pi, run "arecord -l" to make sure there is only one audio input device. Then, you can use "-adcdev plughw:N,M on the pocketsphinx_continous command line to make sure you're using the device you think.
N,M is the card# and subdevice# in the arecord-l output.
HTH
Thank you so much.
After that I had downloaded a continuous.c file and when I typed make I have this problem.
pi@raspberrypi:~/pocketsphinx-5prealpha $ sudo make
Making all in src
make[1]: Entering directory '/home/pi/pocketsphinx-5prealpha/src'
Making all in libpocketsphinx
make[2]: Entering directory '/home/pi/pocketsphinx-5prealpha/src/libpocketsphinx'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/pi/pocketsphinx-5prealpha/src/libpocketsphinx'
Making all in programs
make[2]: Entering directory '/home/pi/pocketsphinx-5prealpha/src/programs'
gcc -DHAVE_CONFIG_H -I. -I../../include -I/home/pi/pocketsphinx-5prealpha/../sphinxbase-5prealpha/include -I/home/pi/pocketsphinx-5prealpha/../sphinxbase-5prealpha/include/sphinxbase -I../../include -I../../src/libpocketsphinx -I../../include -g -O2 -Wall -MT continuous.o -MD -MP -MF .deps/continuous.Tpo -c -o continuous.o continuous.c
continuous.c:71:32: fatal error: sphinxbase/cont_ad.h: No such file or directory
#include <sphinxbase cont_ad.h="">
^
compilation terminated.
Makefile:451: recipe for target 'continuous.o' failed
make[2]: [continuous.o] Error 1
make[2]: Leaving directory '/home/pi/pocketsphinx-5prealpha/src/programs'
Makefile:370: recipe for target 'all-recursive' failed
make[1]: [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/pocketsphinx-5prealpha/src'
Makefile:465: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1</sphinxbase>
Do u have any idea how to fix this one??
You have to build sphinxbase first.
Pocketsphinx assumes sphinxbase was built.
Use this (in a bash script) to do a sphinxbase/pocketsphinx build
Everything seemed okey , I reinstall it and it works fine.
but the problem is that when I download the continuous.file and change some codes in it in order to interprit commands to actions, it shows me the previous error again!!!
any solutions??
You're probably not using a complete gcc command line.
Refer to this page
https://cmusphinx.github.io/wiki/tutorialpocketsphinx/ under the
section titled "Basic Usage (hello world)".
I didn't understand what do you mean !!
now I'm getting this error after I added cont_ad.h file to sphinxbase !!
pi@raspberrypi:~/pocketsphinx-5prealpha/src/programs $ make
gcc -DHAVE_CONFIG_H -I. -I../../include -I/home/pi/pocketsphinx-5prealpha/../sphinxbase/include -I/home/pi/pocketsphinx-5prealpha/../sphinxbase/include/sphinxbase -I../../include -I../../src/libpocketsphinx -I../../include -g -O2 -Wall -MT continuous.o -MD -MP -MF .deps/continuous.Tpo -c -o continuous.o continuous.c
continuous.c:70:32: fatal error: sphinxbase/cont_ad.h: No such file or directory
#include <sphinxbase cont_ad.h="">
^
compilation terminated.
Makefile:451: recipe for target 'continuous.o' failed
make: *** [continuous.o] Error 1</sphinxbase>
I suggest you just start over and walk through the tutorial...
https://cmusphinx.github.io/wiki/tutorialpocketsphinx/
Somehow we are just out of sync. In the code base that I installed (and ran with) there isn't any mention of cont_ad.h. Where did you download from?
I downloaded from sourceforge (refer to my earlier script). My guess is you got it from github?
I just cloned from https://github.com/cmusphinx and still didn't find any mention of cont_ad.h