Overview
CambTTSService provides high-quality text-to-speech synthesis using Camb AI’s MARS model family with streaming capabilities. The service offers multiple model options optimized for different use cases: mars-flash for fast inference and mars-pro for high-quality output.
Camb AI TTS API Reference
Pipecat’s API methods for Camb AI TTS integration
Example Implementation
Complete example with interruption handling
Camb AI Documentation
Official Camb AI API documentation
Camb AI Platform
Access the Camb AI studio platform
Installation
To use Camb AI services, install the required dependencies:Prerequisites
Camb AI Account Setup
Before using Camb AI TTS services, you need:- Camb AI Account: Sign up at Camb AI
- API Key: Generate an API key from your account dashboard
- Voice Selection: Choose voice IDs from the platform
Required Environment Variables
CAMB_API_KEY: Your Camb AI API key for authentication
Configuration
CambTTSService
Camb.ai API key for authentication.
Voice ID to use for synthesis.Deprecated in v0.0.105. Use
settings=CambTTSService.Settings(...) instead.TTS model to use. Options:
"mars-flash" (fast, 22.05kHz), "mars-pro" (high
quality, 48kHz), "mars-instruct" (instruction-following, 22.05kHz).Deprecated in v0.0.105. Use settings=CambTTSService.Settings(...) instead.Request timeout in seconds. 60 seconds is the minimum recommended by Camb.ai.
Output audio sample rate in Hz. If
None, uses the model-specific default
(22050 for mars-flash, 48000 for mars-pro).Runtime-configurable voice settings. See InputParams below.Deprecated in v0.0.105. Use
settings=CambTTSService.Settings(...) instead.Settings
Runtime-configurable settings passed via thesettings constructor argument using CambTTSService.Settings(...). These can be updated mid-conversation with TTSUpdateSettingsFrame. See Service Settings for details.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | None | Model identifier. (Inherited.) |
voice | str | None | Voice identifier. (Inherited.) |
language | Language | str | None | Language for synthesis. (Inherited.) |
user_instructions | str | NOT_GIVEN | Instructions to guide voice synthesis style. |
Usage
Basic Setup
High Quality with mars-pro
With Language Customization
Notes
- Model-specific sample rates: Each model has a fixed output sample rate. Setting a mismatched
sample_ratewill produce a warning and may cause audio issues. - Text length limit: Input text is limited to 3000 characters per request. Longer text is automatically truncated with a warning.
- 140+ languages: Camb.ai supports a wide range of languages through BCP-47 codes.