Skip to content

LiveKit Agents

Use Reson8 speech-to-text with LiveKit Agents to build real-time voice AI applications.

Installation

pip install livekit-plugins-reson8 livekit-plugins-silero

Quick start

from livekit.agents import Agent, AgentSession, AutoSubscribe, JobContext, WorkerOptions, cli
from livekit.agents.stt import StreamAdapter
from livekit.plugins import reson8, silero

async def entrypoint(ctx: JobContext):
    await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)

    vad = silero.VAD.load()
    agent = Agent(
        instructions="You are a helpful Dutch-speaking assistant.",
        stt=StreamAdapter(stt=reson8.STT(language="nl"), vad=vad),
        llm=...,  # any LLM
        tts=...,  # any TTS
        vad=vad,
    )

    session = AgentSession()
    await session.start(agent=agent, room=ctx.room)
    await session.say("Hallo, hoe kan ik je helpen?")

if __name__ == "__main__":
    cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))

How it works

Microphone → Silero VAD → Reson8 STT → LLM → TTS → Speaker

Silero VAD detects speech segments. Each complete segment is sent to Reson8's prerecorded REST API, which returns the transcript. The LLM and TTS can be any provider supported by LiveKit, including models available through LiveKit Inference.

The batch approach with VAD segmentation gives Reson8 full utterances with complete context, producing faster and more accurate transcripts than streaming for conversational agents.

Better turn handling

For more natural conversation pacing, add LiveKit's multilingual turn detector on top of VAD:

pip install livekit-plugins-turn-detector
from livekit.plugins.turn_detector.multilingual import MultilingualModel

agent = Agent(
    ...
    vad=vad,
    turn_detection=MultilingualModel(),
)

This reduces premature interruptions when the user pauses mid-sentence. See the LiveKit turn detection docs for more.

Configuration

Only api_key is required (can also be set via the RESON8_API_KEY environment variable). All other parameters are optional.

Parameter Required Default Description
api_key Yes RESON8_API_KEY env var API key from console.reson8.dev
api_url No https://api.reson8.dev API base URL
language No None (auto-detect) Language code
custom_model_id No None Custom model ID for domain-specific transcription
sample_rate No 16000 Audio sample rate in Hz
include_timestamps No False Include timing data on transcripts
include_words No False Include word-level detail
include_confidence No False Include confidence scores

Environment variables

RESON8_API_KEY=your-api-key
LIVEKIT_URL=wss://your-project.livekit.cloud
LIVEKIT_API_KEY=your-livekit-key
LIVEKIT_API_SECRET=your-livekit-secret