fix(python/voice-live-avatar): replace retired gpt-4o-realtime, align with JS sample#273
Open
zhifzhan wants to merge 2 commits into
Open
Conversation
… models and Azure Realtime UI with JS sample
yinhew
approved these changes
Jun 12, 2026
yulin-li
previously approved these changes
Jun 12, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the Python voice-live-avatar sample to use the current GPT Realtime model IDs and aligns the frontend model/voice options with the JavaScript sample, including support for azure-realtime native voices.
Changes:
- Replaced retired
gpt-4o-*-realtimedefaults withgpt-realtime*in the Python backend and docs. - Expanded the model dropdown and updated the cascaded-model list to keep cascaded-only UI fields toggling correctly.
- Added
azure-realtime-nativevoice support (new UI selector + backend voice config construction).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| python/voice-live-avatar/voice_handler.py | Updates default model and adds backend construction for azure-realtime-native voice config. |
| python/voice-live-avatar/static/index.html | Updates model dropdown options and adds UI elements for selecting native voices. |
| python/voice-live-avatar/static/app.js | Adds model-change behavior for azure-realtime, updates cascaded model list, and toggles native-voice UI fields. |
| python/voice-live-avatar/README.md | Updates documented default model value. |
| python/voice-live-avatar/app.py | Updates backend-provided default model returned to the frontend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yulin-li
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Python
voice-live-avatardemo failing to connect withGPT Realtime(model id was retired) and align its model + voice options with the JavaScript sample.Symptoms
Clicking Connect with the default
GPT Realtimeselection producedError: SESSION_UPDATED event not received. The server log showed Azure rejecting the request with:Changes
gpt-4o-realtime/gpt-4o-mini-realtimewithgpt-realtime/gpt-realtime-miniacrossstatic/index.html,app.py,voice_handler.py,README.md.gpt-realtime-1.5,azure-realtime, fullgpt-5*cascaded family; dropphi4-mmandphi4-mini.static/app.jsso cascaded-only UI fields toggle correctly.azure-realtime-nativevoice handling, mirroring the JS sample:azure-realtime).azure-realtimeauto-switches voice type to native and defaults voice toava; switching away resets to standard.voice_handler._build_voice_configconstructs theazure-realtime-nativevoice viaAzureVoice({"type": ..., "name": ...})since the SDK has no typed subclass for this voice type yet.Notes
Verified end-to-end against an Azure AI Services endpoint: all 19 models in the new dropdown reach
session_startedsuccessfully, includingazure-realtimewith the native voice override.