bambocher / pocketsphinx-python

Python interface to CMU Sphinxbase and Pocketsphinx libraries
https://pypi.python.org/pypi/pocketsphinx
Other
373 stars 187 forks source link

Getting error while running sample program from repo. #12

Closed MayankPratap closed 6 years ago

MayankPratap commented 8 years ago

My python version is 2.7.9 and I am running this program on Ubuntu 15.04

"ERROR: "acmod.c", line 83: Folder 'pocketsphinx/model/en-us/en-us' does not contain acoustic model definition 'mdef' Traceback (most recent call last): File "test.py", line 14, in decoder = Decoder(config) File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 271, in init this = _pocketsphinx.new_Decoder(*args) RuntimeError: new_Decoder returned -1 "

bambocher commented 8 years ago

Try this snippet.

In the terminal:

sudo apt-get install -qq python python-dev python-pip build-essential swig git libpulse-dev
sudo pip install --upgrade pip setuptools wheel pocketsphinx

In ipython or python:

from pocketsphinx import Pocketsphinx
print(Pocketsphinx().decode())