The objective is to stream audio from an outbound call made with Azure Communication Service to a speech recognizer via WebSocket. The process is designed based on this document and this code.The outbound call has been successfully connected, but an error occurs when attempting to start transcription. The error details are as follows:
[
{
'id': 'b83ab652-0ab6-4383-94ad-2c91819d7b1d',
'source': 'calling/callConnections/23005880-74a4-400f-a7c6-a64021b0eb75',
'type': 'Microsoft.Communication.TranscriptionFailed',
'data': {
'transcriptionUpdate': {
'transcriptionStatus': 'transcriptionFailed',
'transcriptionStatusDetails': 'streamUrlMissing'
},
'version': '2025-05-15',
'resultInformation': {
'code': 400,
'subCode': 8581,
'message': 'Action failed, Transport url is not valid or web socket server is not operational.'
},
'callConnectionId': '23005880-74a4-400f-a7c6-a64021b0eb75',
'serverCallId': 'aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzZWEtMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi8wXzloRlM4a3NVU0dNemtHY3ZmNzdRP2k9MTAtMTI4LTEyMy0yNDkmZT02Mzg4NTI4MDE4MDU5MDM4Njc=',
'correlationId': '41926020-8e42-4182-9dcd-bff739751ca1',
'publicEventType': 'Microsoft.Communication.TranscriptionFailed'
},
'time': '2025-06-12T13: 04: 35.4013105+00: 00',
'specversion': '1.0',
'datacontenttype': 'application/json',
'subject': 'calling/callConnections/23005880-74a4-400f-a7c6-a64021b0eb75'
}
]
Transcription is initiated during the RecognizeCompleted event, and verification shows that the WebSocket is open. Both wss:// and ws:// protocols are yielding the same error. The transcription option set during call_automation_client.create_call
is as follows:
transcription_options = TranscriptionOptions(
transport_url=WEBSOCKET_URI_HOST,
transport_type=StreamingTransportType.WEBSOCKET,
locale="en-US",
start_transcription=True,
)