OpenSSL Issue When Running Azure Speech to text on docker

Ayush Kumar 0 Reputation points
2024-05-01T10:44:52.22+00:00

Hey folks, I'm trying to run speech-to-text using Python on a docker container, but I'm getting an SSL error, I have tried following the steps mentioned here for SSL setup and also installed the required dependencies as mentioned here. However, I'm still getting the below error:

[681645]: 1031ms SPX_TRACE_INFO:  web_socket.cpp:479 Start to open websocket. WebSocket: 0x5c061df0, wsio handle: 0x5c077670
[681645]: 1031ms SPX_TRACE_SCOPE_ENTER:  uws_web_socket.cpp:149 Open
[681645]: 1031ms SPX_TRACE_INFO: AZ_LOG_INFO:  tlsio_openssl.c:2027 create_openssl_instance by TLS_method.
[681645]: 1031ms SPX_TRACE_INFO: AZ_LOG_INFO:  tlsio_openssl.c:1849 load_system_store not implemented on this platform
[681645]: 1031ms SPX_TRACE_INFO: AZ_LOG_INFO:  tlsio_openssl.c:1878 CRL check off, as requested.
[681645]: 1044ms SPX_TRACE_SCOPE_EXIT:  uws_web_socket.cpp:149 Open
[681645]: 1044ms SPX_DBG_TRACE_SCOPE_ENTER:  web_socket.cpp:221 ~CSpxWebSocket
[681645]: 1044ms SPX_DBG_TRACE_SCOPE_EXIT:  web_socket.cpp:221 ~CSpxWebSocket
[681645]: 1044ms SPX_TRACE_SCOPE_ENTER:  uws_web_socket.cpp:36 ~UwsWebSocket
[681645]: 1044ms SPX_TRACE_SCOPE_EXIT:  uws_web_socket.cpp:36 ~UwsWebSocket
[681645]: 1084ms SPX_TRACE_ERROR: AZ_LOG_ERROR:  tlsio_openssl.c:691 error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
[681645]: 1084ms SPX_TRACE_ERROR: AZ_LOG_ERROR:  tlsio_openssl.c:2464 FORCE-Closing tlsio instance.
[681645]: 1085ms SPX_TRACE_SCOPE_ENTER:  uws_web_socket.cpp:247 OnWebSocketOpened
[681645]: 1085ms SPX_TRACE_ERROR:  web_socket.cpp:907 WS open operation failed with result=1(WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED), code=2573[0x00000a0d], time=2024-05-01T07:03:52.3847480Z
[681645]: 1085ms SPX_TRACE_INFO:  usp_connection.cpp:933 TS:55, TransportError: connection:0x5c0bdc00, code=5, string=Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED
wss://eastus.stt.speech.microsoft.com/speech/universal/v2
X-ConnectionId: 7000285474f844fca94407cc91efc962.

I have also added the below properties in my code.

speech_config.set_property_by_name("OPENSSL_CONTINUE_ON_CRL_DOWNLOAD_FAILURE", "true")
    speech_config.set_property_by_name("OPENSSL_DISABLE_CRL_CHECK", "true")

Below is my docker file which I'm running

FROM python:3.11.9-bullseye
COPY . /app
WORKDIR /app
RUN apt-get update
RUN apt-get install build-essential libssl-dev ca-certificates libasound2 wget
ENV SSL_CERT_DIR=/usr/lib/ssl/certs
ENV SSL_CERT_FILE /usr/lib/ssl/certs/ca-certificates.crt
RUN pip install -r requirements.txt
EXPOSE 8080
ENTRYPOINT ["python"]
CMD ["src/app.py"]

Below is the container details:

User's image

Can someone please help?

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