Unable to import azure.cognitiveservices.speech as speechsdk

Brian Lee 6 Reputation points
2020-12-12T14:27:19.947+00:00

I am unable to import the Azure speech-to-text module. I have the following error message. Could you please let me know how I can fix this and import this correctly?

Traceback (most recent call last):
File "/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/_speech_py_impl.so, 2): Symbol not found: _pthread_stack_frame_decode_np
Referenced from: /Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.dylib (which was built for Mac OS X 10.14)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm Edu.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/init.py", line 8, in <module>
from .speech import *
File "/Applications/PyCharm Edu.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech.py", line 8, in <module>
from . import speech_py_impl as impl
File "/Applications/PyCharm Edu.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 17, in <module>
_speech_py_impl = swig_import_helper()
File "/Users/brianlee/PycharmProjects/Real-time-Speech/venv/lib/python3.6/site-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 16, in swig_import_helper
return importlib.import_module('_speech_py_impl')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_speech_py_impl'

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,387 questions
{count} vote