0

I am working on creating a program that uses the Speech aspect of Azure's Cognitive Services. When I deploy the executable(.exe) with just console printing, it works as hoped. The program works perfect with the Azure Voice within the VS Code environment, but once it is deployed as an executable (.exe), it completely errors out with the following error:

RuntimeError: Exception with an error code: 0x38 (SPXERR_AUDIO_SYS_LIBRARY_NOT_FOUND)
[CALL STACK BEGIN]

    > property_bag_copy

    - synthesizer_create_speech_synthesizer_from_config

    - synthesizer_create_speech_synthesizer_from_config

    - 00007FFECED052D4 (SymFromAddr() error: Attempt to access invalid address.)

    - 00007FFECED4DA6E (SymFromAddr() error: Attempt to access invalid address.)

    - 00007FFECED4E0F3 (SymFromAddr() error: Attempt to access invalid address.)

    - PyArg_ParseTuple_SizeT

    - PyEval_EvalFrameDefault

    - PyFunction_Vectorcall

    - PyEval_EvalFrameDefault

    - PyObject_GC_Del

    - PyFunction_Vectorcall

    - PyType_GenericNew

    - PyType_GenericNew

    - PyObject_MakeTpCall

    - PyEval_EvalFrameDefault



[CALL STACK END]

I have tried reinstalling all dependencies

  • The line(s) of code that this errors on is as followed: ``` speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speechsdk.SpeechConfig(subscription=<'subscription key'>, region=<'region'>)) ``` – g.schindler17 Jul 27 '21 at 19:40

1 Answers1

1

The error indicates that it is not able to find the audio sys library/

This error might arise if it is not able to access the dependency dll :

Microsoft.CognitiveServices.Speech.extension.audio.sys.dll

You could add this dll to your package before converting it to exe.

enter image description here

The file will be in present at the location where you had installed the Speech Module for python.

Satya V
  • 3,811
  • 1
  • 6
  • 9