0
私は以前にコードを実行して実行しました。 1週間後、いくつかのパッケージのアップデートとインストールが終わってから、もう一度コードを実行しました。今私はこのエラーメッセージが表示されます。CMU sphinx NameError:グローバル名 'Ad'が定義されていません
私は、このテストのために使用するコード:
from pocketsphinx import LiveSpeech
for phrase in LiveSpeech(): print(phrase)
speech = LiveSpeech(lm=True, keyphrase='forward',kws_threshold=1e+20)
for phrase in speech:
print(phrase.segments(detailed=True))
エラーメッセージ:
Traceback (most recent call last):
File "/my/file/is/this.py", line 2, in <module>
for phrase in LiveSpeech(): print(phrase)
File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/__init__.py", line 206, in __init__
self.ad = Ad(self.audio_device, self.sampling_rate)
NameError: global name 'Ad' is not defined