Skip to main content

Cartesia TTS

Reference for Cartesia TTS in LiveKit Inference.

Overview

LiveKit Inference offers voice models powered by Cartesia. Pricing information is available on the pricing page.

Model IDLanguages
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 AgentSession
session = 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, inference
session = 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.
});
modelstringRequired

The model ID from the models list.

voicestringRequired

See voices for guidance on selecting a voice.

languagestringOptional

Language code for the input text. If not set, the model default applies.

extra_kwargsdictOptional

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 voices unavailable

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.

Blake

Energetic American adult male

🇺🇸
Daniela

Calm and trusting Mexican female

🇲🇽
Jacqueline

Confident, young American adult female

🇺🇸
Robyn

Neutral, mature Australian female

🇦🇺

Additional resources

The following links provide more information about Cartesia in LiveKit Inference.