我已经安装了最新版本的 pocketsphinx 和 sphinxbase (0.8)。我尝试将 pocketsphinx 导入 python 代码(Python 3.4.2 版)并像这样使用“解码器”:
try:
import sphinxbase
import pocketsphinx as ps
except:
print ("Pocket sphinx and sphixbase is not installed in your system.
Please install it with package manager.")
speechRec = ps.Decoder(hmm = hmmd, lm = lmdir, dict = dictp, beam = '1e-80')
wavFile = file(wavfile,'rb')
wavFile.seek(44)
speechRec.decode_raw(wavFile)
但是,我收到以下错误:
AttributeError: 'module' object has no attribute 'Decoder'
有人知道出了什么问题吗?