Streaming speech-to-text and text-to-speech with the Nari API. Maintained by Nari Labs. Python 3.11+ · Tested with LiveKit Agents 1.8.2.
Private preview — install from this checkout:
uv sync --extra examples
cp .env.example .envSet NARI_API_KEY in .env. The example also needs OPENROUTER_API_KEY and
OPENROUTER_MODEL.
Add Nari to an existing agent with your LLM:
from livekit.agents import AgentSession
from livekit.plugins import nari, silero
recognizer = nari.STT()
session = AgentSession(
stt=recognizer,
tts=nari.TTS(voice="diana"),
llm=your_llm,
vad=silero.VAD.load(min_silence_duration=0.2),
turn_handling={"turn_detection": "vad"},
)
recognizer.bind(session) # Required before session.start().Defaults: qwen3-asr-fast and qwen3-tts-fast. diana is an English voice.
Create one recognizer per session; LiveKit handles VAD, turns and interruptions.
Custom applications can pass api_key= or export NARI_API_KEY.
The voice agent connects Nari STT → OpenRouter → Nari TTS:
uv run --extra examples python examples/agent.py consoleFor room mode, set the LIVEKIT_* credentials in .env and replace console
with dev.