Azure.AI.VoiceLive (.NET)
Real-time voice AI SDK for building bidirectional voice assistants with Azure AI.
Installation
Current Versions: Stable v1.0.0, Preview v1.1.0-beta.1
Environment Variables
Authentication
Microsoft Entra Token Credential
Required Role: Cognitive Services User (assign in Azure Portal → Access control)
API Key
Client Hierarchy
Core Workflow
1. Start Session and Configure
2. Process Events
3. Send User Message
4. Function Calling
Voice Options
Supported Models
Key Types Reference
Best Practices
- Always set both modalities — Include
TextandAudiofor voice assistants - Use
AzureSemanticVadTurnDetection— Provides natural conversation flow - Configure appropriate silence duration — 500ms typical to avoid premature cutoffs
- Use
usingstatement — Ensures proper session disposal - Handle all event types — Check for errors, audio, text, and function calls
- Use DefaultAzureCredential — Never hardcode API keys
Error Handling
Audio Configuration
- Input Format:
InputAudioFormat.Pcm16(16-bit PCM) - Output Format:
OutputAudioFormat.Pcm16 - Sample Rate: 24kHz recommended
- Channels: Mono


