An Azure service that integrates speech processing into apps and services.
Hello @Phil Nylund,
Thank you for reaching out. I understand how disruptive this is, especially since your Speech Playground and application were working previously.
Based on what you've described, there are two likely factors at play:
- A temporary service-side issue affecting the Realtime backend, which is why the error is occurring even in the Azure AI Foundry Speech Playground.
- The ongoing transition from the legacy preview model (
gpt-4o-realtime-preview) to the newer generally available Realtime model (gpt-realtime-1.5).
Why You're Seeing This Error
The error message Connection error to Realtime service: Invalid response status indicates that the Speech Playground is unable to establish a valid connection to the Realtime service. Since the same issue occurs directly in the Azure AI Foundry portal, this strongly suggests that the problem is not related to your local code or environment.
While gpt-4o-realtime-preview remains available until its retirement date, it is now considered a legacy preview model. As Microsoft continues transitioning customers to the latest Realtime offering, some intermittent issues may occur with older preview deployments.
Recommended Action: Migrate to gpt-realtime-1.5
Microsoft recommends moving to the latest generally available Realtime model: gpt-realtime-1.5.
This model provides:
- Improved reliability and stability
- Better voice quality
- Enhanced instruction following
- Long-term support compared to preview models
1: Verify Your Deployment
In the Azure portal:
- Open your Azure OpenAI resource.
- Confirm that you have deployed the
gpt-realtime-1.5model. - Verify that the deployment name exactly matches the name you reference in your application and in the Speech Playground.
2: Refresh the Speech Playground
If the Speech Playground still shows only gpt-4o-realtime-preview:
- Clear your browser cache, or
- Open the portal in an Incognito/InPrivate window.
This forces the UI to refresh the available model list.
If needed, sign out and sign back into Azure AI Foundry.
3: Update Your Application
Replace any references to:
gpt-4o-realtime-preview
with:
gpt-realtime-1.5
For example:
parser.add_argument(
4: Use the Correct Endpoint
For the GA Realtime API:
- Endpoint:
/openai/v1 - Do not include an
api-versionquery parameter
Also ensure:
- Your endpoint URL matches your Azure OpenAI resource
- Your API key or Microsoft Entra authentication is valid
- Your deployment name is correct
Example
from azure.identity import DefaultAzureCredential
If You Are Using WebSockets
Update your session initialization payload to:
{
If the Playground Still Fails
Please check the following:
- Try again after some time, as this may be a transient backend issue.
- Test in another supported Azure region, if available.
- Review Azure Service Health for any active incidents affecting Azure OpenAI Realtime services.
The issue is likely a combination of a temporary Realtime service issue and the transition away from the preview model.
Your current code is likely fine.
Migrating to gpt-realtime-1.5 is the recommended path forward.
In most cases, updating the model name and refreshing the Playground resolves the issue.
Please refer this
Troubleshooting Connection Errors in Azure AI Foundry portal https://learn.microsoft.com/azure/foundry/agents/how-to/tools/azure-ai-speech#troubleshooting
Use the GPT Realtime API for speech and audio (ai-foundry-portal) https://learn.microsoft.com/azure/foundry/openai/how-to/realtime-audio?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#troubleshooting
Resolving WebRTC API Connection Issues with Azure OpenAI https://learn.microsoft.com/azure/ai-services/openai/how-to/realtime-audio-websockets
Azure Samples: aoai-realtime-audio-sdk (Python examples) https://github.com/Azure-Samples/aoai-realtime-audio-sdk/tree/main/python/samples
I Hope this helps. Do let me know if you have any further queries.
If this answers your query, please do click Accept Answer and Yes for was this answer helpful.
Thank you!