livekit-plugins-azure is a Python plugin for the LiveKit Agents framework, providing seamless integration with Azure AI Speech services for Speech-to-Text (STT) and Text-to-Speech (TTS). It is currently at version 1.5.4 and receives frequent updates as part of the broader LiveKit Agents ecosystem.
pip install livekit-plugins-azureVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a LiveKit Agent session using Azure Speech for both Speech-to-Text (STT) and Text-to-Speech (TTS). It requires setting `AZURE_SPEECH_KEY` and `AZURE_SPEECH_REGION` environment variables for authentication.
To disable preemptive generation, pass `preemptive_generation=False` to your `AgentSession` constructor. `session = AgentSession(ctx, preemptive_generation=False, ...)` [cite: 0 (from prompt)]
Use `from livekit.plugins import azure` for Azure Speech STT/TTS. Use `from livekit.plugins import openai` (and methods like `with_azure()`) for Azure OpenAI LLM, STT, or TTS.
Ensure `AZURE_SPEECH_KEY` and `AZURE_SPEECH_REGION` are correctly set as environment variables or passed directly to the `azure.STT` and `azure.TTS` constructors. If using `speech_auth_token`, it must be supplied explicitly.