Add Voice Agents realtime streaming client - #48957
Closed
xitzhang (xitzhang) wants to merge 1 commit into
Closed
Conversation
|
Azure Pipelines: 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
xitzhang (xitzhang)
marked this pull request as ready for review
September 10, 2026 08:59
|
Azure Pipelines: 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
xitzhang (xitzhang)
force-pushed
the
xitzhang/voice-agents-autogen
branch
from
September 10, 2026 10:17
7aa5ee1 to
b76c1ab
Compare
Adds the hand-written realtime WebSocket streaming client for Voice Agents, on top of the generated code and REST/CRUD support added in xitzhang/voice-agents-autogen (part 1 of 2): - A new client.realtime / async_client.realtime entry point. Use with client.realtime.connect(agent_name=...) as connection: to open a WebSocket connection, connection.send(...) to send strongly-typed client events, and iterate over connection to receive strongly-typed server events. The new types Realtime, RealtimeConnection, and RealtimeConnectionManager (and async equivalents) are exported from azure.ai.projects / azure.ai.projects.aio. - Requires the optional websockets package for the sync client, or aiohttp for the async client (new [realtime] extra). - Samples demonstrating live text and audio conversations, and client-executed function tools during a live session. - Mocked unit tests for the realtime client, plus live-only integration tests for real conversations against a voice agent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xitzhang (xitzhang)
force-pushed
the
xitzhang/voice-agents-streaming
branch
from
September 10, 2026 11:08
159ba60 to
9c0203e
Compare
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
Adds the hand-written realtime WebSocket streaming client for Voice Agents. This PR is part 2 of 2, based on and pointing to #48956 (generated code + REST/CRUD support), which must merge first.
This is a split of #48939 into two independently reviewable pieces, at the requester's request. #48939 itself is untouched.
What's included
client.realtime/async_client.realtimeentry point for realtime speech-to-speech streaming. Usewith client.realtime.connect(agent_name=...) as connection:to open a WebSocket connection,connection.send(...)to send strongly-typed client events (or theconnection.response,connection.conversation.item, andconnection.sessionhelpers), and iterate overconnectionto receive strongly-typed server events.Realtime,RealtimeConnection, andRealtimeConnectionManager(and async equivalentsAsyncRealtime,AsyncRealtimeConnection,AsyncRealtimeConnectionManager) exported fromazure.ai.projects/azure.ai.projects.aio.User-Agentheader,x-ms-client-sdkquery parameter).realtimeextra (websocketsfor the sync client,aiohttpfor the async client).Validation
sample_workflow_multi_agent.py)api.md/api.metadata.yml/docs/public-methods.md)Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com