Agent Framework plugin for services from Azure
Actively maintained. Last release 5 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install livekit-plugins-azureAzure Plugin for LiveKit Agents
Complete Azure AI integration for LiveKit Agents, including Azure Speech Services and Azure Voice Live Realtime API.
What's included:
- RealtimeModel - Azure Voice Live for speech-to-speech
- STT - Powered by Azure Speech Services
- TTS - Powered by Azure Speech Services with neural voices
For Azure OpenAI LLM (non-realtime), see the OpenAI plugin which supports LLM.with_azure().
See https://docs.livekit.io/agents/integrations/azure/ for more information.
Installation
pip install livekit-plugins-azure
# For the Azure Voice Live realtime model
pip install "livekit-plugins-azure[realtime]"
Realtime Mode (Azure Voice Live)
Azure Credentials
For the realtime speech-to-speech model:
export AZURE_VOICE_LIVE_ENDPOINT=https://<region>.api.cognitive.microsoft.com/
export AZURE_VOICE_LIVE_API_KEY=<your-speech-key>
export AZURE_VOICE_LIVE_MODEL=<model-name> # e.g., gpt-realtime, gpt-4o, gpt-4o-mini, etc.
To authenticate with Microsoft Entra ID instead of an API key, pass use_default_credential=True, which uses DefaultAzureCredential.
To power the intelligence of your voice agent, you have flexibility and choice in the generative AI model between GPT-Realtime, GPT-5, GPT-4.1, Phi, and more options. For supported models and regions, see Supported models and regions.
Quick Start
Azure Voice Live provides end-to-end speech-to-speech:
from livekit import agents
from livekit.agents import Agent, AgentServer, AgentSession
from livekit.plugins import azure
class Assistant(Agent):
def __init__(self):
super().__init__(
instructions="You are a helpful voice assistant powered by Azure."
)
async def on_enter(self):
await self.session.generate_reply(
instructions="Greet the user and offer assistance"
)
server = AgentServer()
@server.rtc_session()
async def entrypoint(ctx: agents.JobContext):
session = AgentSession(
llm=azure.realtime.RealtimeModel(
voice="en-US-AvaMultilingualNeural",
)
)
await session.start(room=ctx.room, agent=Assistant())
if __name__ == "__main__":
agents.cli.run_app(server)