Skip to main content

Camb.ai TTS plugin guide

How to use the Camb.ai TTS plugin for LiveKit Agents.

Available in
Python

Overview

This plugin allows you to use Camb.ai as a TTS provider for your voice agents.

Quick reference

This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.

Installation

Install the plugin from PyPI:

pip install "livekit-agents[cambai]~=1.4"

Authentication

The Camb.ai plugin requires an Camb.ai API key.

Set CAMB_API_KEY in your .env file.

Usage

Use Camb.ai TTS in an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import cambai
session = AgentSession(
tts = cambai.TTS(
model="mars-flash",
voice=147320,
),
# ... llm, stt, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference links in the Additional resources section for a complete list of all available parameters.

modelSpeechModelOptionalDefault: mars-flash

ID of the model to use for speech generation. To learn more, see official documentation.

voiceintOptionalDefault: 147320

ID of the voice used for speech generation. To retrieve available voice IDs, see official documentation.

Additional resources

The following resources provide more information about using Camb.ai with LiveKit Agents.