snowboy在ubuntu 18.04安裝
安裝wukong
1.conda create -n robot python=3.7
conda activate robot
2.git clone https://github.com/wzpan/wukong-robot.git
cd wukong-robot
3.sudo apt-get install python-pyaudio python3-pyaudio sox pulseaudio libsox-fmt-all ffmpeg
pip3 install pyaudio --> 改為 python -m pip install pyaudio
4.cd wukong-robot
pip3 install -r requirments.txt
安裝wukong-contrib
1.mkdir $HOME/.wukong
cd $HOME/.wukong
2. git clone http://github.com/wzpan/wukong-contrib contrib
pip3 install -r contrib/requirements.txt
安裝swig (編譯所需) 3.0.10
1.wget http://hahack-1253537070.file.myqcloud.com/misc/swig-3.0.10.tar.gz
tar xvf swig-3.0.10.tar.gz
cd swig-3.0.10
./configure --prefix=/usr --without-clisp --without-maximum-compile-warnings
make
sudo make install
install -v -m755 -d /usr/share/doc/swig-3.0.10
sudo cp -v -R Doc/* /usr/share/doc/swig-3.0.10
安裝snowboy
1.wget http://hahack-1253537070.file.myqcloud.com/misc/snowboy.tar.bz2
tar -xvjf snowboy.tar.bz2
cd snowboy/swig/Python3
sudo make
2.產生 _snowboydetect.so
拷貝到 ~/wukong-robot/snowboy/examples/Python3, 執行demo.py 進行測試
(1) 需修改snowboydecoder.py
把” from . import snowboydetect” 改成 ” import snowboydetect”
(2) 要有三個檔案 snowboydecoder.py snowboydetect.py _snowboydetect.so
一個目錄 resources
一個範例語音(或自己訓練的) snowboy.umdl
3. python3 demo.py snowboy.umdl
4. 自己訓練則到 https://snowboy.kitt.ai/dashboard 下載 xxx.pmdl 檔案
執行python3 wukong.py
1.pip3 install -r requirements.txt
python3 wukong.py update
python3 wukong.py
2.開啟瀏覽器 http://localhost:5000/