-
Notifications
You must be signed in to change notification settings - Fork 31
如何在树莓派上安装 PocketSphinx
Junjie Wang edited this page Nov 18, 2017
·
1 revision
by tyler
You can find the downloads here: http://cmusphinx.sourceforge.net/wiki/download.
wget https://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/sphinxbase-5prealpha.tar.gz/download -O sphinxbase.tar.gz
wget https://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/pocketsphinx-5prealpha.tar.gz/download -O pocketsphinx.tar.gz
tar -xzvf sphinxbase.tar.gz
tar -xzvf pocketsphinx.tar.gz
sudo apt-get install bison libasound2-dev swig
cd sphinxbase-5prealpha
./configure --enable-fixed
makesudo make install
Install is simple, you need to setup and properly configure alsa, then you can just build and run pocketsphinx
sudo apt-get update
sudo apt-get upgrade
cat /proc/asound/cards
check your microphone is visible or not and if on which usb extension
sudo nano /etc/modprobe.d/alsa-base.conf
Now change this
Keep snd-usb-audio from being loaded as first soundsudcard
To options snd-usb-audio index=0
if there is some other options snd-usb-audio index=1, comment it out
sudo reboot
cat /proc/asound/cards
check your device is at 0
sudo apt-get install bison
sudo apt-get install libasound2-dev
download sphinxbase latest, extract
./configure --enable-fixed
make
sudo make install
download pocketsphinx, extract
./configure
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
pocketsphinx_continuous -inmic yes
来宝人工智能:基于树莓派的语音对话机器人