steep-balloon-41261
12/20/2025, 12:22 PMtall-airline-16756
12/20/2025, 12:22 PMtall-airline-16756
12/20/2025, 12:22 PMopenai.STT.with_azure(model="gpt-4o_transcribe", use_realtime) is not supported — the SDK attempted to connect to a /realtime WebSocket path that doesn’t exist for that model, producing the WSServerHandshakeError 404.
What you can do next
• If you only need transcription (non–full-duplex): use REST-based STT:
stt = openai.STT.with_azure(model="gpt-4o-transcribe")
This sends audio over HTTP and returns transcriptions (supported in Python).
• If you need true low-latency, bidirectional realtime voice (live streaming, turn-taking, TTS, etc.): migrate to Azure’s Realtime API with a realtime-capable deployment (e.g., gpt-4o-realtime) via RealtimeModel.with_azure(...) and read transcription events (e.g., input_audio_transcription_completed). Configure modalities=["text"] if you want text-only output.
Quick checks to help me help you further
• Which option do you want: REST transcription or full realtime voice interaction?
• Which SDK/package and version are you using (exact pip package/version or requirements)?
• What's the exact deployment name you created in your Azure portal (so we can confirm mismatch)?
Tell me those and I’ll give exact code snippets and next steps for your chosen approach.
Sources: Azure OpenAI STT plugin guide | LiveKit docs | Azure OpenAI Realtime API and LiveKit | LiveKit docscreamy-window-79763
12/20/2025, 12:24 PMtall-airline-16756
12/20/2025, 12:24 PMopenai.STT.with_azure() does not support a use_realtime WebSocket mode for any Azure model. The STT helper is for REST-based transcription (e.g., gpt-4o-transcribe) only.
• Realtime (WebSocket) streaming is supported via the Realtime API and the RealtimeModel.with_azure() path, not openai.STT.with_azure(). Models intended for that API are realtime-capable models such as gpt-4o-realtime (or other realtime deployments you create).
• You cannot call gpt-realtime (or gpt-4o-realtime) through openai.STT.with_azure(). To use a realtime-capable model, create a realtime deployment in Azure and use RealtimeModel.with_azure(...), then handle transcription events (for example, input_audio_transcription_completed) from the realtime stream.
If you want, tell me whether you prefer:
• REST transcription with gpt-4o-transcribe (I’ll give the exact code), or
• Realtime streaming with gpt-4o-realtime (I’ll show how to set up RealtimeModel.with_azure() and read transcription events).creamy-window-79763
12/20/2025, 12:26 PMtall-airline-16756
12/20/2025, 12:26 PMuse_realtime argument on openai.STT.with_azure() is not functional for Azure STT. openai.STT.with_azure() is designed for REST-based transcription (e.g., gpt-4o-transcribe) and does not have a supported WebSocket realtime mode on Azure.
• Realtime streaming is provided by the Azure OpenAI Realtime API and the LiveKit API surface for it is RealtimeModel.with_azure(...). Realtime-capable deployments (for example gpt-4o-realtime or other realtime-deployed models) must be used through RealtimeModel.with_azure, not through openai.STT.with_azure().
Why the parameter may appear exposed
• The parameter exists in the STT helper API surface but it’s not applicable to Azure’s gpt-4o-transcribe REST-only deployments. This can make it look like a realtime toggle, but Azure’s transcription model does not expose the /realtime WebSocket endpoint, so setting use_realtime will fail with the 404 handshake error you saw.
What to do next
• If you want transcription only: use openai.STT.with_azure(model="gpt-4o-transcribe") (REST).
• If you want true realtime streaming and transcription events: create a realtime-capable deployment in Azure and use `RealtimeModel.with_azure(...)`; handle transcription events from the realtime stream.
If you’d like, tell me which path you prefer and I’ll give the exact code snippets and the minimal Azure deployment settings for that flow.