osx - dyld:未加载库原因:未找到图像 - Python Google 语音识别 API
osx - dyld: Library not loaded Reason: image not found - Python Google Speech Recognition API
当我尝试使用 Google 语音录制 API 时,我收到此错误消息。有帮助吗?
dyld: Library not loaded: /usr/local/Cellar/flac/1.3.1/lib/libFLAC.8.dylib
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/speech_recognition/flac-mac
Reason: image not found
我正在使用 PyCharm。
我试过复制粘贴卸载重装都没有用。帮助 :) 我的整个项目是让用户说些什么,然后让 google translate 翻译它并让它说出答案。我已经涵盖了翻译和口语,但语音识别是我现在遇到的麻烦。提前致谢
这里有更多错误消息。
Traceback (most recent call last):
File >"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line >162, in _run_module_as_main
"main", fname, loader, pkg_name)
File >"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >line >72, in _run_code
exec code in run_globals
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/speech_recognition/main.py", line 12, in
audio = r.listen(source)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/speech_recognition/init.py", line 264, in listen
buffer = source.stream.read(source.CHUNK)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/pyaudio.py", line 605, in read
return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
明白了 - 我只是忘了安装 Homebrew
首先,你必须安装自制软件。
其次,安装 homebrew 后,您需要安装 flac:
brew install flac
当我尝试使用 Google 语音录制 API 时,我收到此错误消息。有帮助吗?
dyld: Library not loaded: /usr/local/Cellar/flac/1.3.1/lib/libFLAC.8.dylib
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/speech_recognition/flac-mac
Reason: image not found
我正在使用 PyCharm。
我试过复制粘贴卸载重装都没有用。帮助 :) 我的整个项目是让用户说些什么,然后让 google translate 翻译它并让它说出答案。我已经涵盖了翻译和口语,但语音识别是我现在遇到的麻烦。提前致谢
这里有更多错误消息。
Traceback (most recent call last): File >"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line >162, in _run_module_as_main "main", fname, loader, pkg_name) File >"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >line >72, in _run_code exec code in run_globals File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/speech_recognition/main.py", line 12, in audio = r.listen(source) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/speech_recognition/init.py", line 264, in listen buffer = source.stream.read(source.CHUNK) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/pyaudio.py", line 605, in read return pa.read_stream(self._stream, num_frames) IOError: [Errno Input overflowed] -9981
明白了 - 我只是忘了安装 Homebrew
首先,你必须安装自制软件。
其次,安装 homebrew 后,您需要安装 flac:
brew install flac