使用pocketsphinx模块,实现唤醒词功能。
运行环境:
win10 + Python3.6.2
安装模块包:
> pip install pocketsphinx
C:\Users\qpf10>pip install pocketsphinx
Collecting pocketsphinx
Downloading https://files.pythonhosted.org/packages/52/53/30b12c3e4de918e32e73e9d635b4c9e1765512acc94ad0b51bfe960b54c9/pocketsphinx-0.1.15-cp36-cp36m-win_amd64.whl (29.1MB)
100% |████████████████████████████████| 29.1MB 104kB/s
Installing collected packages: pocketsphinx
Successfully installed pocketsphinx-0.1.15
pypi官方简介:
Pocketsphinx是CMU Sphinx语音识别开源工具包的一部分。
这个包为使用SWIG和Setuptools创建的CMU Sphinxbase和Pocketsphinx库提供了一个python接口。
一、运行官方自带案例-LiveSpeech
原文:It's an iterator class for continuous recognition or keyword search from a microphone.
有道翻译:它是一个迭代器类,用于从麦克风连续识别或关键字搜索。
在pycharm中运行代码,完美运行。
import os
from pocketsphinx imp