Skip to content

[VoiceLive] Update for 2026-06-01-preview#47089

Open
xitzhang wants to merge 3 commits into
mainfrom
xitzhang/vl_20260601preview
Open

[VoiceLive] Update for 2026-06-01-preview#47089
xitzhang wants to merge 3 commits into
mainfrom
xitzhang/vl_20260601preview

Conversation

@xitzhang
Copy link
Copy Markdown
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings May 22, 2026 20:25
@xitzhang
Copy link
Copy Markdown
Member Author

/azp run python - azure-ai-voicelive - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the azure-ai-voicelive package for a new preview release (1.3.0b1), adding new VoiceLive models/enums/events (Azure realtime native voices, WebRTC/RTC negotiation events, hosted-agent invocation passthrough, audio playback lifecycle events, enhanced echo cancellation options), refreshing docs/samples/tests, and including some deserialization performance optimizations.

Changes:

  • Added new public models/enums and event types (Azure realtime native voice, RTC SDP negotiation + error events, invocation delta passthrough, output-audio start/stop events, enhanced echo cancellation options).
  • Bumped package versioning/packaging/docs to preview (1.3.0b1), updated Python minimum to 3.10, and refreshed samples/readmes/changelog.
  • Introduced performance-focused fast paths in deserialization and XML model parsing logic.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sdk/voicelive/azure-ai-voicelive/tests/test_unit_models.py Adds unit tests for new models/events (native voice, echo cancellation, RTC and audio lifecycle server events).
sdk/voicelive/azure-ai-voicelive/tests/test_unit_models_interim_response_foundry.py Adds tests for hosted-agent invocation delta and invoke_input.
sdk/voicelive/azure-ai-voicelive/tests/test_unit_enums.py Adds enum tests for realtime native voice names, echo cancellation reference source, and new event values.
sdk/voicelive/azure-ai-voicelive/tests/test_unit_connection.py Updates API version used in a URL query assertion.
sdk/voicelive/azure-ai-voicelive/tests/test_unit_client_events.py Adds unit tests for RTC SDP create client event.
sdk/voicelive/azure-ai-voicelive/tests/test_live_realtime_service.py Updates live test API version matrix values.
sdk/voicelive/azure-ai-voicelive/samples/README.md Updates prerequisites/install guidance and sample descriptions (incl. API version callouts).
sdk/voicelive/azure-ai-voicelive/samples/BASIC_VOICE_ASSISTANT.md Updates prerequisites/install/config guidance and notes about stdout logging.
sdk/voicelive/azure-ai-voicelive/samples/basic_voice_assistant_async.py Updates sample docstring to clarify logging behavior and voice default text.
sdk/voicelive/azure-ai-voicelive/samples/async_mcp_sample.py Updates sample description text regarding MCP/API-version requirement.
sdk/voicelive/azure-ai-voicelive/README.md Switches package messaging to preview, updates install/auth snippets, and modernizes examples.
sdk/voicelive/azure-ai-voicelive/pyproject.toml Marks package as Beta and enforces Python >=3.10.
sdk/voicelive/azure-ai-voicelive/CHANGELOG.md Adds 1.3.0b1 entry describing new features.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_models.py Adds new models/events and expands voice unions to include realtime native voices.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/_enums.py Adds new enums and event-type values (native voice names, echo ref source, RTC + audio lifecycle server events).
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/models/init.py Re-exports newly added models/enums/events.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py Adjusts lint suppression and overload formatting.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_version.py Bumps version to 1.3.0b1.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_utils/serialization.py Adds scalar/header deserialization fast path.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_utils/model_base.py Adds XML deserialization performance improvements and rest_field(deserializer=...) support.
sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/_types.py Expands Voice union to include AzureRealtimeNativeVoice.
sdk/voicelive/azure-ai-voicelive/apiview-properties.json Updates APIView mappings for newly added public symbols.
sdk/voicelive/azure-ai-voicelive/_metadata.json Updates declared API version to 2026-06-01-preview.

Comment on lines +1423 to +1437
if target_obj == "str" and isinstance(response_data, str):
return response_data
if isinstance(response_data, str):
if target_obj == "int":
return int(response_data)
if target_obj == "bool":
if response_data in ("true", "1", "True"):
return True
if response_data in ("false", "0", "False"):
return False
return bool(response_data)
if target_obj == "rfc-1123":
return Deserializer.deserialize_rfc(response_data)
if target_obj == "bytearray":
return Deserializer.deserialize_bytearray(response_data)
Comment on lines +1429 to +1433
if response_data in ("true", "1", "True"):
return True
if response_data in ("false", "0", "False"):
return False
return bool(response_data)
Comment on lines +2 to +4
"apiVersion": "2026-06-01-preview",
"apiVersions": {
"VoiceLive": "2026-04-10"
"VoiceLive": "2026-06-01-preview"
@pytest.mark.flaky(reruns=3, reruns_delay=2)
@pytest.mark.parametrize("model", ["gpt-realtime", "gpt-4.1", "phi4-mm-realtime", "phi4-mini"])
@pytest.mark.parametrize("api_version", ["2025-10-01", "2026-01-01-preview"])
@pytest.mark.parametrize("api_version", ["2025-10-01", "2026-04-10"])
credential=self.credential,
endpoint="https://test.azure.com",
api_version="2026-01-01-preview",
api_version="2026-04-10",
typed server events (including audio) for responsive, interruptible conversations.

> **Status:** General Availability (GA). This is a stable release suitable for production use.
> **Status:** Preview (`1.3.0b1`). This beta release includes the latest SDK and sample updates and may change before the next stable release.
Comment on lines +120 to +122
- **agent_v2_sample.py**: Demonstrates how to connect to an Azure AI Foundry agent using flattened `connect()` keyword arguments. Shows the new pattern where agents are configured at connection time rather than as tools in the session. Features callback-based audio streaming, sequence number based interrupt handling, standard logger output for conversation events, and defaults the agent connection to API version `2026-04-10`.
- **async_function_calling_sample.py**: Demonstrates async function calling capabilities with the VoiceLive SDK, showing how to handle function calls from the AI model.
- **async_mcp_sample.py**: Demonstrates async MCP capabilities with Entra ID-first authentication and uses API version `2026-04-10` for MCP support.
@xitzhang
Copy link
Copy Markdown
Member Author

/azp run python - azure-ai-voicelive - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants