Azure Voice Live for Python
Guides Python developers in building real-time, bidirectional voice AI applications on Azure.
The skill recommends DefaultAzureCredential, constrains production credential chains, and promotes context-managed resources; however, it still includes API-key examples and does not specify least-privilege RBAC, audio/transcript data flows, sensitive-data retention, user confirmation for function or MCP tools, or rollback, so points are deducted.
Installation, authentication, connection lifecycle, events, and error handling are documented; however, the quick start does not close DefaultAzureCredential, examples rely on undefined microphone/playback pseudocode, credential scopes differ from the reference default, and no reproducible skill-specific tests are supplied, limiting the static score.
The audience, asynchronous Python context, and scenarios such as assistants, transcription, function calling, and avatars are clear; non-fit boundaries, precise triggers, Chinese-language support, and mainland-China reachability are not addressed, and the core dependency is Azure-hosted, so points are deducted.
The material has clear installation, environment-variable, API, model, and example references, plus MIT licensing and 1.0.0 metadata; it lacks a changelog, explicit maintenance owner/update path, and disclosure of several service/model prerequisites, while some examples remain pseudocode.
It covers the main Voice Live tasks and offers directly reusable starting snippets; nevertheless, outputs depend on user-supplied audio and playback implementations, important integrations are incomplete, and correctness or end-to-end usability is not demonstrated by skill-specific evidence, so points are deducted.
Structured API and model references are provided, and repository-level CI/evaluation and test signals exist; however, there are no skill-specific test results, third-party execution records, or revision-mapped corroboration for the key paths, so the evidence remains primarily author-provided documentation.
- Do not place the YOUR_KEY examples, pseudocode, or unverified model/event names directly into production; validate the pinned SDK version, API version, credential scope, and service capabilities first.
- Function calling, MCP, avatars, and transcription may create external effects or process sensitive audio; add application-level confirmation, permission isolation, input validation, redacted logging, and retention controls.
- Confirm regional availability, network reachability, and compliance requirements for Azure Voice Live in the intended mainland-China deployment environment.
What it does & when to use it
This skill is for Python developers using the Azure AI Voice Live SDK to build real-time, bidirectional audio applications over WebSockets. It covers asynchronous connections, Entra authentication, legacy API-key access, audio streaming, session configuration, transcription, voice activity detection, function calling, and conversation control. Its examples fit voice assistants, voice chatbots, real-time speech-to-speech translation, and voice-driven avatars. The skill requires an asynchronous SDK path and emphasizes context managers for deterministic resource cleanup.
Shows how to install azure-ai-voicelive, aiohttp, and azure-identity; configure the Azure Cognitive Services endpoint and authentication environment variables; open an asynchronous Voice Live connection with DefaultAzureCredential or AzureKeyCredential for existing keyed deployments; configure text and audio modalities, voices, audio formats, Server VAD, or Azure Semantic VAD; send Base64-encoded PCM audio through input_audio_buffer; and handle audio deltas, transcription, responses, function calls, and errors. It also covers response cancellation, output-buffer clearing, session updates, and conversation items.
- A Python developer building a real-time voice assistant can stream audio over an asynchronous WebSocket connection and process model responses.
- A team developing a voice chatbot can configure transcription, voices, conversation history, and server-side voice activity detection.
- An application developer implementing real-time speech-to-speech translation can use bidirectional audio streaming and transcription events for continuous conversations.
- A developer building a voice-driven avatar can combine a Voice Live session with an avatar integration scenario.
- A developer whose voice application must call business functions or MCP tools can handle function-call arguments and submit function outputs.
Pros & cons
- Provides copyable examples for asynchronous connections, authentication, audio streaming, and event handling.
- Covers Server VAD, Azure Semantic VAD, manual turns, interruption handling, transcription, and function calling.
- Clearly recommends DefaultAzureCredential and explains how to constrain its production credential chain.
- Documents connection resources, voice options, audio formats, and error-handling patterns.
- It explicitly targets the asynchronous Python SDK and is not suited to a synchronous request path.
- Examples require an Azure service endpoint, credentials, and network connectivity; the source does not explain pricing or quotas.
- The source does not provide test-coverage results or an independent release process for this specific skill.
- MCP tools, avatar integration, and reference documents are mentioned, but complete implementations are not included in the supplied content.
How to install
To install the repository's skill collection, run npx skills add microsoft/skills and select the needed skill in the wizard. Alternatively, clone the repository and copy .github/plugins/azure-sdk-python/skills/azure-ai-voicelive-py/ into the target agent's skill directory. The source does not document a standalone installation command for this skill; its Python dependency command is pip install azure-ai-voicelive aiohttp azure-identity.
How to use
Trigger it when building an Azure real-time bidirectional voice application in Python, for example: Use azure-ai-voicelive-py to build an async voice assistant with Server VAD, transcription, and function calling. Set AZURE_COGNITIVE_SERVICES_ENDPOINT before use; for production DefaultAzureCredential, also set AZURE_TOKEN_CREDENTIALS=prod or a specific credential. Use the .aio namespace and manage connections and asynchronous credentials with async with.
Compared to similar skills
The source presents two authentication paths: DefaultAzureCredential is recommended, while AzureKeyCredential is reserved for existing keyed deployments that have not migrated to Entra ID. It also distinguishes Server VAD, Azure Semantic VAD, and manual turn control.