Closed Cdmoonb closed 6 years ago
没装好 pocketsphinx ,试过安装对应的 python 库没?
sudo apt-get install python-pocketsphinx
或者 pypi 的安装方法
# Make sure we have up-to-date versions of pip, setuptools and wheel:
$ pip install --upgrade pip setuptools wheel
$ pip install --upgrade pocketsphinx
pi@raspberrypi:~/workspace/dingdang $ cat temp/dingdang.log
2018-01-15 23:53:32,822 dingdang.py[line:175] ERROR Error occured!
Traceback (most recent call last):
File "dingdang.py", line 173, in
pi@raspberrypi:~/workspace/dingdang $ uname -a Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
遇到同样的问题。执行以下两条命令后,问题依旧没有解决。 $ pip install --upgrade pip setuptools wheel $ pip install --upgrade pocketsphinx
建议使用镜像安装方式,不同的系统差别太大,难以帮助解决。
运行 sudo ldconfig 命令之后,问题解决。
我重装了系统ubuntu16.04LTS 然后重新按照步骤走了一遍 是成功的 应该是我中间步骤出错了 谢
系统:ubuntu16.04LTS python:2.7.12 dingdang.log: 2018-01-04 19:01:54,033 dingdang.py[line:174] ERROR Error occured! Traceback (most recent call last): File "dingdang.py", line 172, in
app = Dingdang()
File "dingdang.py", line 94, in init
stt_passive_engine_class.get_passive_instance(),
File "/home/chenpeng/dingdang/client/stt.py", line 59, in get_passive_instance
return cls.get_instance('keyword', phrases)
File "/home/chenpeng/dingdang/client/stt.py", line 53, in get_instance
instance = cls(**config)
File "/home/chenpeng/dingdang/client/stt.py", line 110, in init
import pocketsphinx as ps
ImportError: libpocketsphinx.so.1: cannot open shared object file: No such file or directory
pycharm run:
Exception AttributeError: "'PocketSphinxSTT' object has no attribute '_logfile'" in <bound method PocketSphinxSTT.del of <client.stt.PocketSphinxSTT object at 0x7fe000f58fd0>> ignored
Process finished with exit code 1
代码: /# quirky bug where first import doesn't work
这里进入exception就弹出进入del程序退出
def del(self):