最近业务反馈在我负责的Serverless平台上执行的python脚本,访问azure的speechsdk失败,报错日志如下
1 2 3 4 5 6 7 8
| 2024-09-02 18:47:16.455 Azure OpenAI is listening. Say 'Stop' or press Ctrl-Z to end the conversation. 2024-09-02 18:47:16.457 SESSION STARTED: SessionEventArgs(session_id=1f5fbe81d5e44fd999adec19ec4d8ffb) 2024-09-02 18:47:18.345 CANCELED: SpeechRecognitionCanceledEventArgs(session_id=1f5fbe81d5e44fd999adec19ec4d8ffb, result=SpeechRecognitionResult(result_id=40be7cc2eb02493095a25bc74c729cb1, text="", reason=ResultReason.Canceled)) 2024-09-02 18:47:18.345 CANCELED DETAIL:CancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED wss://southeastasia.stt.speech.microsoft.com/speech/universal/v2 X-ConnectionId: 1f5fbe81d5e44fd999adec19ec4d8ffb SessionId: 1f5fbe81d5e44fd999adec19ec4d8ffb") 2024-09-02 18:47:18.346 SESSION STOPPED SessionEventArgs(session_id=1f5fbe81d5e44fd999adec19ec4d8ffb) 2024-09-02 18:47:18.346 CLOSING on SessionEventArgs(session_id=1f5fbe81d5e44fd999adec19ec4d8ffb)
|
业务把wss协议改成ws协议以后,就可以正常访问服务了
同时在Serverless平台以外,直接在该镜像下也是可以正常访问服务的
因此合理怀疑是Serverless平台的python脚本,使用SSL会存在问题