I've been trying to start a project involving azure speech to text and for testing purpose wanted to corroborate the workings with the demo code found in this site:
Installed all the prerequisites from Microsoft redistributables to pip install azure-cognitiveservices-speech
.
I've set my default microphone.
Got my subscription key and region from azure cognitive service via azure portal> all resources> speech resource> keys and endpoint
But im unable to start the demo since it throws error 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND)
The traceback is
Traceback (most recent call last):
File "c:\Users\user\Desktop\Azure test\test.py", line 26, in <module>
recognize_from_microphone()
File "c:\Users\user\Desktop\Azure test\test.py", line 10, in recognize_from_microphone
speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config)
File "C:\Users\user\Desktop\Azure test\.env\lib\site-packages\azure\cognitiveservices\speech\speech.py", line 808, in __init__
self._impl = self._get_impl(impl.SpeechRecognizer, speech_config, audio_config, language, source_language_config, auto_detect_source_language_config)
File "C:\Users\user\Desktop\Azure test\.env\lib\site-packages\azure\cognitiveservices\speech\speech.py", line 870, in _get_impl
return reco_type._from_config(speech_config._impl)
RuntimeError: Exception with an error code: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND)
The call stack goes as follow
[CALL STACK BEGIN]
> pal_string_to_wstring
- pal_string_to_wstring
- audio_config_get_audio_processing_options
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
- pal_string_to_wstring
[CALL STACK END]
Just in case it matter I'm using Windows 11 and Python 3.9.12 acquired from microsoft store.
I would post the code but it's a literal copy of the one found in the html only with the subscription key which found in said place.
Edit:
I was able to run the same example using javascript but node.js only supports from audio file to text which is not what I'm looking for.
Also azure speech to text does work with microphone using js but using the browser with means client side but optimally this isn't what I'm looking for. Just pointing this out as proof all resource from azure are configured correctly and maybe this is something related to python or pip package manager but like i said all the dll files mentioned in other topics are in the virtual environment so it "shouldn't" be an issue
If someone could help me since I'm at loss here.