Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.71k stars 1.8k forks source link

Failed to get HTTP platform singleton instance. Error: 27 #2436

Open jiangyongandy opened 4 weeks ago

jiangyongandy commented 4 weeks ago

openssl version OpenSSL 3.2.2 4 Jun 2024 (Library: OpenSSL 3.2.2 4 Jun 2024)

cat /etc/os-release NAME="CentOS Stream" VERSION="9" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="9" PLATFORM_ID="platform:el9" PRETTY_NAME="CentOS Stream 9" ANSI_COLOR="0;31" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:centos:centos:9" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://issues.redhat.com/" REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9" REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

python3.9 pip install azure-cognitiveservices-speech python quickstart.py Traceback (most recent call last): File "/home/ecs-user/py_excel_course_extract/text-to-speech/quickstart.py", line 16, in speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config) File "/usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/speech.py", line 2225, in init _call_hr_fn(fn=_sdk_lib.synthesizer_create_speech_synthesizer_from_config, *[ File "/usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 62, in _call_hr_fn _raise_if_failed(hr) File "/usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 55, in _raise_if_failed try_get_error(_spx_handle(hr)) File "/usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 50, in try_get_error raise RuntimeError(message) RuntimeError: Exception with error code: [CALL STACK BEGIN]

/usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x86086) [0x7fb3ee486086] /usr/local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x274) [0x7fb3ee5d3952] /lib64/libffi.so.8(+0x78d6) [0x7fb3ef3728d6] /lib64/libffi.so.8(+0x4556) [0x7fb3ef36f556] /usr/lib64/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so(+0x8e5d) [0x7fb3eee83e5d] /usr/lib64/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so(+0x8742) [0x7fb3eee83742] /lib64/libpython3.9.so.1.0(_PyObject_Call+0x78) [0x7fb3ef125498] /lib64/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x4026) [0x7fb3ef113c66] /lib64/libpython3.9.so.1.0(+0x10ec85) [0x7fb3ef10ec85] /lib64/libpython3.9.so.1.0(_PyFunction_Vectorcall+0xe5) [0x7fb3ef11c975] /lib64/libpython3.9.so.1.0(PyVectorcall_Call+0x95) [0x7fb3ef1255a5] /lib64/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x4026) [0x7fb3ef113c66] /lib64/libpython3.9.so.1.0(+0x10ec85) [0x7fb3ef10ec85] /lib64/libpython3.9.so.1.0(_PyFunction_Vectorcall+0xe5) [0x7fb3ef11c975] /lib64/libpython3.9.so.1.0(_PyObject_FastCallDictTstate+0xda) [0x7fb3ef117f0a] /lib64/libpython3.9.so.1.0(+0x123987) [0x7fb3ef123987] /lib64/libpython3.9.so.1.0(+0x1186b3) [0x7fb3ef1186b3] /lib64/libpython3.9.so.1.0(_PyObject_MakeTpCall+0x14c) [0x7fb3ef1184fc] [CALL STACK END]

Failed to get HTTP platform singleton instance. Error: 27

Gilthans commented 4 weeks ago

I've been getting the same issue. This is most likely a package upgrade that broke something. Locally, my scripts are working, but when installing in a fresh docker file this starts happening (I know, I should be freezing my packages...)

I'm trying to discover what package is causing this with no success. What's frustrating is that this happens AFTER the connection start is accepted...

Gilthans commented 4 weeks ago

I've upgraded all python packages locally, and still the issue only happens on the docker image. This causes me to suspect this is related to libSSL 1 being installed in the image (due to #2204). It also seems that libSSL 3 support was FINALLY (!!!!) added to the latest release, and there are updated platform requirements: (https://learn.microsoft.com/en-us/azure/ai-services/speech-service/releasenotes?tabs=speech-sdk#speech-sdk-1380-2024-june-release) This seems like a very likely culprit

I'll try to rebuild the image without libSSL 1 and report

Gilthans commented 4 weeks ago

Well, I've tried removing the installation for SSL 1.1.1, which was previously required due to #2204, and installed all platform requirements as stated here for Debian. But still the package fails with this same error, on both STT and TTS:

[CALL STACK BEGIN]

/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x86086) [0x7fe0a9350086]
/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x274) [0x7fe0a949d952]
/opt/conda/lib/python3.10/lib-dynload/../../libffi.so.8(+0x6a4a) [0x7fe0c6868a4a]
/opt/conda/lib/python3.10/lib-dynload/../../libffi.so.8(+0x5fea) [0x7fe0c6867fea]
/opt/conda/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0x12461) [0x7fe0c6880461]
/opt/conda/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0x86eb) [0x7fe0c68766eb]
/opt/conda/bin/python(PyObject_Call+0x207) [0x565216f47067]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x2d83) [0x565216f2d2b3]
/opt/conda/bin/python(_PyFunction_Vectorcall+0x6c) [0x565216f3aa2c]
/opt/conda/bin/python(PyObject_Call+0xbc) [0x565216f46f1c]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x2d83) [0x565216f2d2b3]
/opt/conda/bin/python(_PyFunction_Vectorcall+0x6c) [0x565216f3aa2c]
/opt/conda/bin/python(_PyObject_FastCallDictTstate+0x187) [0x565216f33007]
/opt/conda/bin/python(+0x14e0c1) [0x565216f440c1]
/opt/conda/bin/python(_PyObject_MakeTpCall+0x27b) [0x565216f33a7b]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x5723) [0x565216f2fc53]
/opt/conda/bin/python(_PyObject_FastCallDictTstate+0xd0) [0x565216f32f50]
/opt/conda/bin/python(+0x14e0c1) [0x565216f440c1]
[CALL STACK END]

Failed to get HTTP platform singleton instance. Error: 27
INFO:     172.17.0.1:52956 - "POST /test-tts HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/opt/conda/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/opt/conda/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/opt/conda/lib/python3.10/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/opt/conda/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/opt/conda/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/opt/conda/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "/opt/conda/lib/python3.10/site-packages/fastapi/routing.py", line 193, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
  File "/opt/conda/lib/python3.10/site-packages/starlette/concurrency.py", line 42, in run_in_threadpool
    return await anyio.to_thread.run_sync(func, *args)
  File "/opt/conda/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/hiredge/apps/streaming-server/streaming_server/app.py", line 78, in test_tts
    wav_data = _get_tts_result(tts_request.language, tts_request.text)
  File "/hiredge/apps/streaming-server/streaming_server/app.py", line 68, in _get_tts_result
    tts_generator = AzureTTSGenerator(language, "int-id")
  File "/hiredge/apps/streaming-server/streaming_server/tts/azure_tts_generation.py", line 34, in __init__
    self.speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=self.speech_config, audio_config=None)
  File "/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 2225, in __init__
    _call_hr_fn(fn=_sdk_lib.synthesizer_create_speech_synthesizer_from_config, *[
  File "/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 62, in _call_hr_fn
    _raise_if_failed(hr)
  File "/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 55, in _raise_if_failed
    __try_get_error(_spx_handle(hr))
  File "/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 50, in __try_get_error
    raise RuntimeError(message)
RuntimeError: Exception with error code:
[CALL STACK BEGIN]

/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x86086) [0x7fe0a9350086]
/opt/conda/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x274) [0x7fe0a949d952]
/opt/conda/lib/python3.10/lib-dynload/../../libffi.so.8(+0x6a4a) [0x7fe0c6868a4a]
/opt/conda/lib/python3.10/lib-dynload/../../libffi.so.8(+0x5fea) [0x7fe0c6867fea]
/opt/conda/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0x12461) [0x7fe0c6880461]
/opt/conda/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0x86eb) [0x7fe0c68766eb]
/opt/conda/bin/python(PyObject_Call+0x207) [0x565216f47067]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x2d83) [0x565216f2d2b3]
/opt/conda/bin/python(_PyFunction_Vectorcall+0x6c) [0x565216f3aa2c]
/opt/conda/bin/python(PyObject_Call+0xbc) [0x565216f46f1c]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x2d83) [0x565216f2d2b3]
/opt/conda/bin/python(_PyFunction_Vectorcall+0x6c) [0x565216f3aa2c]
/opt/conda/bin/python(_PyObject_FastCallDictTstate+0x187) [0x565216f33007]
/opt/conda/bin/python(+0x14e0c1) [0x565216f440c1]
/opt/conda/bin/python(_PyObject_MakeTpCall+0x27b) [0x565216f33a7b]
/opt/conda/bin/python(_PyEval_EvalFrameDefault+0x5723) [0x565216f2fc53]
/opt/conda/bin/python(_PyObject_FastCallDictTstate+0xd0) [0x565216f32f50]
/opt/conda/bin/python(+0x14e0c1) [0x565216f440c1]
[CALL STACK END]

Failed to get HTTP platform singleton instance. Error: 27

This is very frustrating. Not only is this a regression, the error message is completely useless, and only triggers at the last possible moment, when an actual call is made, instead of at initialization time (or even package installation time!). The worst type of error and a huge waste of time.

For now, the only solution that worked for me was pinning the version to 1.37:

azure-cognitiveservices-speech==1.37.0

I hope the maintainers respond, instead of letting this issue auto-close as is way too common in this repo.

jiangyongandy commented 4 weeks ago

replace azure-cognitiveservices-speech==1.37.0 python quickstart.py Traceback (most recent call last): File "/home/ecs-user/py_excel_course_extract/text-to-speech/quickstart.py", line 16, in speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config) File "/home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/speech.py", line 2223, in init _call_hr_fn(fn=_sdk_lib.synthesizer_create_speech_synthesizer_from_config, *[ File "/home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 62, in _call_hr_fn _raise_if_failed(hr) File "/home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 55, in _raise_if_failed try_get_error(_spx_handle(hr)) File "/home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/interop.py", line 50, in try_get_error raise RuntimeError(message) RuntimeError: Exception with error code: [CALL STACK BEGIN]

/home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1e3f11) [0x7f90bbbe3f11] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20d2e7) [0x7f90bbc0d2e7] /lib64/libc.so.6(+0x8ee18) [0x7f90bc48ee18] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20e41c) [0x7f90bbc0e41c] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b445f) [0x7f90bbbb445f] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b3d15) [0x7f90bbbb3d15] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1eaca5) [0x7f90bbbeaca5] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1dbdc0) [0x7f90bbbdbdc0] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1d5d8e) [0x7f90bbbd5d8e] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0xdc8bd) [0x7f90bbadc8bd] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1eaca5) [0x7f90bbbeaca5] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1ccb4f) [0x7f90bbbccb4f] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x21b9a6) [0x7f90bbc1b9a6] /home/ecs-user/.local/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0xf3) [0x7f90bbabf169] /lib64/libffi.so.8(+0x78d6) [0x7f90bc2998d6] /lib64/libffi.so.8(+0x4556) [0x7f90bc296556] /usr/lib64/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so(+0x8e5d) [0x7f90bc2e8e5d] [CALL STACK END]

Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176

Gilthans commented 3 weeks ago

This is a separate issue, with a different solution - see #2204 You need to install the old OpenSSL v1.1.1, i.e for debian/ubuntu:

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
zeroskyx commented 3 weeks ago

Same issue with the C# SDK and the new version of the package.

The previous version 1.37 works with openssl 1.1 but NOT with openssl 3 (as expected, error thrown: platform dependency not met)

The new version 1.38 fails with openssl 1.1 (platform dependency not met) and ALSO fails with openssl 3 (with the error of this thread).

Arch Linux with all most-recent packages.

Right now the only option is to go back to 1.37 and continue to install openssl 1.1.

forrestsocool commented 3 weeks ago

replace azure-cognitiveservices-speech==1.37.0 /home/ubuntu/.conda/envs/py310/bin/python /home/ubuntu/project/news_reporter/tools/azure_tts.py Traceback (most recent call last): File "/home/ubuntu/project/news_reporter/tools/azure_tts.py", line 92, in speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=audio_config) File "/home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/speech.py", line 2223, in init _call_hr_fn(fn=_sdk_lib.synthesizer_create_speech_synthesizer_from_config, *[ File "/home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 62, in _call_hr_fn _raise_if_failed(hr) File "/home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 55, in _raise_if_failed try_get_error(_spx_handle(hr)) File "/home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/interop.py", line 50, in try_get_error raise RuntimeError(message) RuntimeError: Exception with error code: [CALL STACK BEGIN]

/home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1ec00c) [0xeaa6037dc00c] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20c5e4) [0xeaa6037fc5e4] /lib/aarch64-linux-gnu/libc.so.6(+0x825d4) [0xeaa6042325d4] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x20d564) [0xeaa6037fd564] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1bc394) [0xeaa6037ac394] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b9ec0) [0xeaa6037a9ec0] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1f2d0c) [0xeaa6037e2d0c] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x2066d0) [0xeaa6037f66d0] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1dbc88) [0xeaa6037cbc88] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1094dc) [0xeaa6036f94dc] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1f2d0c) [0xeaa6037e2d0c] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x1b9a0c) [0xeaa6037a9a0c] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(+0x225290) [0xeaa603815290] /home/ubuntu/.conda/envs/py310/lib/python3.10/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so(synthesizer_create_speech_synthesizer_from_config+0x10c) [0xeaa6036b21a4] /home/ubuntu/.conda/envs/py310/lib/python3.10/lib-dynload/../../libffi.so.8(+0xc050) [0xeaa603dcc050] /home/ubuntu/.conda/envs/py310/lib/python3.10/lib-dynload/../../libffi.so.8(+0x9580) [0xeaa603dc9580] /home/ubuntu/.conda/envs/py310/lib/python3.10/lib-dynload/_ctypes.cpython-310-aarch64-linux-gnu.so(+0x144f8) [0xeaa603e044f8] [CALL STACK END]

Runtime error: Failed to initialize platform (azure-c-shared). Error: 2176

dage commented 1 week ago

I've been struggling with this as well. I ended up switching to using the REST API which worked perfectly for my use case. Actually Claude Sonnet 3.5 switched the implementation without any errors on the first attempt when I fed in this autogenerated porting guide along with my azure-cognitiveservices-speech based implementation: https://www.perplexity.ai/page/azure-text-to-speech-rest-api-mw5a5jOfS8ySs5UjlkWssA