Closed S1lverhand closed 2 weeks ago
Hi, this is because of a missing library file in the Speech SDK Python packages. We will fix it in the next Speech SDK 1.41.0 release due in October. Before that, please try the following as a workaround:
Check where azure-cognitiveservices-speech
is installed, like
C:\>python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import azure.cognitiveservices.speech as speechsdk
>>> print(speechsdk.__file__)
C:\Apps\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\azure\cognitiveservices\speech\__init__.py
-> in this example, C:\Apps\WPy64-31241\python-3.12.4.amd64\Lib\site-packages\azure\cognitiveservices\speech\
is the location of the installed module.
Download the Speech SDK nuget package of the same version from https://www.nuget.org/packages/Microsoft.CognitiveServices.Speech/1.40.0
Unzip the downloaded microsoft.cognitiveservices.speech.1.40.0.nupkg
(it's a zip compressed archive)
Go to the extracted runtimes\win-x64\native
folder and copy Microsoft.CognitiveServices.Speech.extension.kws.ort.dll
to the Python module location shown above.
Then the advanced keyword models will work.
This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label.
Fixed in the Speech SDK 1.41.1 release.
I am doing keyword recognition in Python 3.9 with azure-cognitiveservices-speech=1.40.0 using PyCharm 2024.1.1 (Professional Edition) on a Windows 11 Pro machine. The following code works for basic models as expected, but throws
SPXERR_INVALID_ARG
for advanced models (lowfa, midfa and highfa). All models have been trained on the same day, 30th August.My code:
Stacktrace:
I have attached the log file. speech_sdk.log
Using a dedicated
KeywordRecognizer
as in the official example (which by the way raisesNotImplementedError
forsave_to_wav_file_async
in line 764) also does not work for advanced models. It printsCANCELED: CancellationReason.Error
.