bambocher / pocketsphinx-python

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

RuntimeError: new_Ad returned -1 #25

Open chintan121 opened 7 years ago

chintan121 commented 7 years ago

Error opening audio device (null) for capture: Connection refused Traceback (most recent call last): File "1test.py", line 3, in speech = LiveSpeech() File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/init.py", line 206, in init self.ad = Ad(self.audio_device, self.sampling_rate) File "/usr/local/lib/python2.7/dist-packages/sphinxbase/ad.py", line 102, in init this = _ad.new_Ad(audio_device, sampling_rate) RuntimeError: new_Ad returned -1

my code is from pocketsphinx import LiveSpeech for phrase in LiveSpeech(): print(phrase)

YasserAntonio commented 6 years ago

Same issue,i don't get why. Anyone solved this please ?

MeckPommER commented 6 years ago

Same issue here. Reason was pulseaudio not running. Checked with "ps -C pulseaudio" Started with "pulseaudio -D" and LiveSpeech demo is now running without Problems.