Technical & DevelopmentIntermediate
azure-ai-voicelive-py
Real-time bidirectional voice AI
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/microsoft/skills --skill azure-ai-voicelive-pynpx skills add https://github.com/microsoft/skills --skill azure-ai-voicelive-pyOr paste this URL into your assistant to install:
Overview
What This Skill Does
Python SDK for building real-time voice AI applications over WebSocket connections with Azure AI. Handles bidirectional audio streaming, voice activity detection, function calling, and transcription in a single async interface. Connects to models like GPT-4o Realtime for low-latency speech-to-speech interactions.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
Azure AI Voice Live SDK
Build real-time voice AI applications with bidirectional WebSocket communication.
Installation
pip install azure-ai-voicelive aiohttp azure-identity
Environment Variables
AZURE_COGNITIVE_SERVICES_ENDPOINT=https://<region>.api.cognitive.microsoft.com # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
AZURE_COGNITIVE_SERVICES_KEY=<api-key> # Only required for the legacy API-key auth path below
Authentication & Lifecycle
🔑 Two rules apply to every code sample below:
- Prefer
DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
- Local dev:
DefaultAzureCredentialworks as-is.- Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.
Lines 1 - 25 of 329
Recommendations