Skip to Content

LiveKit agents (Cartesia plugin)

Use Revolab voices in a livekit-agents voice agent through the stock livekit-plugins-cartesia plugin — no custom plugin needed, just a base_url.

What the plugin talks to

WS wss://api.revolab.ai/tts/websocket POST https://api.revolab.ai/tts/bytes

Agent configuration

# pip install livekit-agents livekit-plugins-cartesia from livekit.agents import AgentSession from livekit.plugins import cartesia session = AgentSession( # ... your STT / LLM / VAD config ... tts=cartesia.TTS( api_key="rvl_live_...", # your Revolab API key base_url="https://api.revolab.ai", # point the plugin at Revolab model="nada-1.0-flash", voice="<your-voice-id>", sample_rate=24000, ), )

Behaviour notes

AreaBehaviour
How it connectsThe plugin drives the Cartesia-compatible websocket (wss …/tts/websocket) with your key in the X-API-Key header. base_url is all you change — the plugin derives the websocket URL from it.
Per-sentence latencyThe plugin streams one sentence per message with max_buffer_delay_ms=0; Revolab synthesizes each sentence as it arrives, so agent speech starts after the first sentence — not after the whole LLM turn.
One-shot pathtts.synthesize(...) uses POST /tts/bytes with the raw PCM container — also supported.
Word timestampsThe plugin requests word timestamps for synced transcripts; Revolab produces none yet, which the plugin tolerates — audio and transcripts work, per-word alignment is simply absent.
Models & voicesPass a Revolab model (nada-1.0-flash / nada-1.0-pro) and a voice ID from your voice library — the plugin defaults to sonic-3, which returns a 400 listing valid models.

The full websocket contract lives on the Cartesia compatibility page.