Documentation Index
Fetch the complete documentation index at: https://docs.camb.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Generate natural-sounding speech from text using the CAMB.AI SDK. This tutorial covers installation, generating your first audio, choosing a model, and listing voices.Listen to an Example
Prerequisites
Create an account
Sign up at CAMB.AI Studio if you haven’t already.
Get your API key
Go to Settings → API Keys in Studio and copy your key. See Authentication for details.
Install the SDK
Code
Listing Voices
List available voices to find the right one for your use case:Parameters
Required
| Parameter | Type | Description |
|---|---|---|
text | string | Text to convert to speech (min 3 characters) |
voice_id | integer | Voice ID to use (e.g., 147320) |
Optional
| Parameter | Type | Default | Description |
|---|---|---|---|
language | string | "en-us" | BCP-47 language code |
speech_model | string | "mars-flash" | mars-8.1-flash-beta, mars-8.1-pro-beta, mars-flash, mars-pro, or mars-instruct |
output_configuration | object | {} | Output format: wav, mp3, or pcm_s16le |
mars-instruct supports embedded emotion tags and SSML-style breaks for fine-grained control. See Emotional Voice Control for examples.
Next Steps
Emotional Voice Control
Add emotional expression and dramatic pacing with mars-instruct.
TTS with Accents
Generate speech in 140+ language accents with the same voice.
Voice Cloning
Clone a voice from reference audio and generate speech with it.
MARS 8 Models
Compare model variants in detail.