我想在嵌入式设备上安装Pocketsphinx-python,该设备的环境已使用Buildroot构建。不幸的是,当我运行代码时,我收到错误日志。有问题的设备是智能扬声器。
这是我的代码:
from pocketsphinx import LiveSpeech
for phrase in LiveSpeech():
print(phrase)
这是我的结果:
python test_pocketsphinx.py2019-04-05 15:02:16.799 [1ae2] I MRMLoggerDelegate:WHA:text=Device\:sendHeartBeat\:seq\=76\,remote\=XX796e\,roundTripMs\=10\,masterXmitTimestamp\=1495055341
2019-04-05 15:02:16.810 [1ae3] I MRMLoggerDelegate:WHA:text=Device\:sendHeartBeat\:seq\=76\,remote\=XXa5d6\,roundTripMs\=21\,masterXmitTimestamp\=14950553322185\,slaveRecvTimestamp\=771
2019-04-05 15:02:16.816 [1ae4] I MRMLoggerDelegate:WHA:text=Device\:sendHeartBeat\:seq\=76\,remote\=XXc0ee\,roundTripMs\=27\,masterXmitTimestamp\=14950553364101\,slaveRecvTimestamp\=776
Failed to create secure directory (/root/.config/pulse): No such file or directory
Error opening audio device (null) for capture: Connection refused
Traceback (most recent call last):
File "test_pocketsphinx.py", line 2, in <module>
for phrase in LiveSpeech():
File "usr/lib/python2.7/site-packages/pocketsphinx/__init__.py", line 206, in __init__
File "usr/lib/python2.7/site-packages/sphinxbase/ad_pulse.py", line 124, in __init__
RuntimeError: new_Ad returned -1