LiveKit Ultravox Plugin
LiveKit plugin for Ultravox's real-time speech-to-speech AI models, providing seamless integration with the LiveKit Agents framework.
Installation
pip install livekit-plugins-ultravox
Prerequisites
You'll need an API key from Ultravox. Set it as an environment variable:
export ULTRAVOX_API_KEY="your_api_key_here"
Optional: enable debug logs for the plugin (disabled by default):
export LK_ULTRAVOX_DEBUG=true
Basic Usage
Simple Voice Assistant
import asyncio
from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli, inference
from livekit.plugins.ultravox.realtime import RealtimeModel
async def entrypoint(ctx: JobContext):
await ctx.connect()
session: AgentSession[None] = AgentSession(
allow_interruptions=True,
vad=inference.VAD(),
llm=RealtimeModel(
model_id="fixie-ai/ultravox",
voice="Mark",
),
)
await session.start(
agent=Agent(
instructions="You are a helpful voice assistant.",
),
room=ctx.room,
)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
Voice Assistant with Tools
from livekit.agents import function_tool, Agent, AgentSession, JobContext, WorkerOptions, cli, inference
from livekit.plugins.ultravox.realtime import RealtimeModel
@function_tool
async def get_weather(location: str) -> str:
"""Get weather information for a location."""
return f"The weather in {location} is sunny and 72°F"
@function_tool
async def book_appointment(date: str, time: str) -> str:
"""Book an appointment."""
return f"Appointment booked for {date} at {time}"
async def entrypoint(ctx: JobContext):
await ctx.connect()
session: AgentSession[None] = AgentSession(
allow_interruptions=True,
vad=inference.VAD(),
llm=RealtimeModel(model_id="fixie-ai/ultravox"),
)
await session.start(
agent=Agent(
instructions="You are a helpful assistant with access to weather and scheduling tools.",
tools=[get_weather, book_appointment],
),
room=ctx.room,
)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
Configuration Options
Ultravox API (/api/calls) Parameters
RealtimeModel(
model_id="fixie-ai/ultravox", # Model to use (warn + pass-through if unknown)
voice="Mark", # Voice to use (warn + pass-through if unknown)
api_key=None, # API key (defaults to env var)
base_url=None, # API base URL (defaults to Ultravox API)
system_prompt="You are helpful.", # System prompt
input_sample_rate=16000, # Input audio sample rate
output_sample_rate=24000, # Output audio sample rate
client_buffer_size_ms=60, # Audio buffer size (min 200ms used on WS)
http_session=None, # Custom HTTP session
)
Notes:
- Unknown models/voices: the plugin logs a warning and sends them as-is; the server validates.
- Metrics: the plugin emits a single `metrics_collected` event per generation. To log them,
add a listener in your app and call the helper:
```python
from livekit.agents import metrics
@session.on("metrics_collected")
def on_metrics_collected(ev):
metrics.log_metrics(ev.metrics)
Metadata
Release files for livekit-plugins-ultravox 1.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| livekit_plugins_ultravox-1.8.3.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| livekit_plugins_ultravox-1.8.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.5 kB
Release files / livekit_plugins_ultravox-1.8.3.tar.gz
| Download URL | livekit_plugins_ultravox-1.8.3.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
455e6d5144ca02f5152651298f3dd0646efca23005151dd842c66c0435adea53
|
|
BLAKE2b-256 checksum How to use checksums |
076c20a0224ad3a01b5f6111479fb33519af09d91a426bbd757e07b3e256d889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / livekit_plugins_ultravox-1.8.3-py3-none-any.whl
| Download URL | livekit_plugins_ultravox-1.8.3-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c100db8c68aecaff39da4128750ee4ebb32eb404c497ecbc1df4d14cd93e4394
|
|
BLAKE2b-256 checksum How to use checksums |
2d8b6210a90031c844de9210805192b7f67040b3ff7ae59408173adfefdbeb2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency log