Python pocketsphinx RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly

折月煮酒 提交于 2019-11-28 23:43:48
Alaa BEN JABALLAH

You will need these libraries for compiling pocketsphinx:

sudo apt-get install -qq python python-dev python-pip build-essential swig libpulse-dev

After that it's simple to install pocketsphinx:

sudo pip install pocketsphinx

as @Nikolay Shmyrev mentioned, you can simply

pip install pocketsphinx

to solve the issue

I was trying to do the same thing and had trouble with

# Make sure we have up-to-date versions of pip, setuptools and wheel:
$ pip install --upgrade pip setuptools wheel

$ pip install --upgrade pocketsphinx

from the pocketsphinx docs https://pypi.python.org/pypi/pocketsphinx

The error was

error: command 'gcc' failed with exit status 1

I am working on a mac and needed to install the x-code command line tools. From the command line

xcode-select --install

then the pip install worked and

r.recognize_sphinx(audio)

works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!