Registry / azure / livekit-plugins-azure

livekit-plugins-azure

JSON →
library1.6.0pypypiunverified

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-azure
INSTALL
IMPORT
SIG · LIVEKIT-PLUGINS-AZ
L
livekit-plugins-azure
azurepythonv1.6.0
Install
17.8s avg
Import
Disk
335MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 17.8s · import 0.000s · 330MB
335MB installed
● package 335MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

STT
from livekit.plugins.azure import STT
from livekit.plugins.azure import STT
TTS
from livekit.plugins.azure import TTS
from livekit.plugins.azure import TTS

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.

import os from livekit.agents import AgentSession, JobContext from livekit.plugins import azure async def my_azure_agent(ctx: JobContext): # Ensure AZURE_SPEECH_KEY and AZURE_SPEECH_REGION are set in your environment # e.g., via a .env file or directly as environment variables. speech_key = os.environ.get('AZURE_SPEECH_KEY', '') speech_region = os.environ.get('AZURE_SPEECH_REGION', '') if not speech_key or not speech_region: print("Error: AZURE_SPEECH_KEY and AZURE_SPEECH_REGION environment variables must be set.") return session = AgentSession( ctx, stt=azure.STT( speech_key=speech_key, speech_region=speech_region ), tts=azure.TTS( speech_key=speech_key, speech_region=speech_region, voice="en-US-JennyNeural" # Specify a voice for TTS ) # You would typically add an LLM (e.g., from livekit.plugins.openai) here # llm=openai.responses.LLM.with_azure(...) ) print("LiveKit Agent session initialized with Azure Speech STT and TTS.") # Example: Make the agent say something immediately # await session.easy_reply("Hello, I am an AI agent powered by Azure Speech.") # This is where your agent's main logic would run # await session.run()
Debug
Known issues
breakingLiveKit Agents v1.5.0 introduced 'preemptive generation' enabled by default for LLMs and TTS. This can impact latency expectations and resource usage across all agents, including those using Azure plugins. If not desired, it needs to be explicitly disabled during AgentSession initialization.
fix
To disable preemptive generation, pass `preemptive_generation=False` to your `AgentSession` constructor. `session = AgentSession(ctx, preemptive_generation=False, ...)` [cite: 0 (from prompt)]
affects: >=1.5.0
gotchaThere is a common confusion between `livekit-plugins-azure` and `livekit-plugins-openai`. `livekit-plugins-azure` is for native Azure Speech STT/TTS services. Azure OpenAI (for LLM interactions, or OpenAI-powered STT/TTS endpoints hosted on Azure) requires `livekit-plugins-openai` configured with Azure-specific parameters.
fix
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.
affects: All
gotchaAzure Speech authentication primarily relies on `AZURE_SPEECH_KEY` and `AZURE_SPEECH_REGION` environment variables. While `speech_auth_token` can be used, it's typically ephemeral and must be passed programmatically as an argument, not via environment variables.
fix
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.
affects: All
Upgrade
Version history
1.6.0latest on PyPI · released Jun 11, 2026
Audit
Dependencies
livekit-agentsrequiredThis package is a plugin designed to extend the functionality of the LiveKit Agents framework.
Agent activity
40 hits · last 30 days
node
36
Bingbot
1
OpenAI (training)
1
Resources
livekit-plugins-azure — pip install livekit-plugins-azure · libregistry