Overview
LiveKit Inference offers voice models powered by Cartesia. Pricing information is available on the pricing page.
Model ID | Languages |
---|---|
cartesia/sonic | enfrdeesptzhjahiitkonlplrusvtr |
cartesia/sonic-2 | enfrdeesptzhjahiitkonlplrusvtr |
cartesia/sonic-turbo | enfrdeesptzhjahiitkonlplrusvtr |
Usage
To use Cartesia, pass a descriptor with the model and voice to the tts
argument in your AgentSession
:
from livekit.agents import AgentSessionsession = AgentSession(tts="cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",# ... llm, stt, vad, turn_detection, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({tts="cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",// ... tts, stt, vad, turn_detection, etc.});
Parameters
To customize additional parameters, use the TTS
class from the inference
module:
from livekit.agents import AgentSession, inferencesession = AgentSession(tts=inference.TTS(model="cartesia/sonic-2",voice="9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",language="en"),# ... tts, stt, vad, turn_detection, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({tts: new inference.TTS({model: "cartesia/sonic-2",voice: "9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",language: "en"}),// ... tts, stt, vad, turn_detection, etc.});
The model ID from the models list.
Language code for the input text. If not set, the model default applies.
Additional parameters to pass to the Cartesia TTS API, including duration
, and speed
. See the provider's documentation for more information.
Voices
LiveKit Inference supports all of the default "Cartesia Voices" available in the Cartesia API. You can explore the available voices in the Cartesia voice library (free account required), and use the voice by copying its ID into your LiveKit agent session.
Custom Cartesia voices, including voice cloning, are not yet supported in LiveKit Inference. To use custom voices, create your own Cartesia account and use the Cartesia plugin for LiveKit Agents instead.
The following is a small sample of the Cartesia voices available in LiveKit Inference.
Use the keyboard and arrows to audition voices
Use the keyboard and arrows to audition voices
Additional resources
The following links provide more information about Cartesia in LiveKit Inference.