Overview
The Camb.ai Python SDK provides a simple interface to integrate high-quality text-to-speech into your applications. This quickstart will have you generating speech in under 5 minutes.Installation
Authentication
Get your API key from CAMB.AI Studio and set it as an environment variable:.env file:
Quick Start
Streaming Text-to-Speech
Generate and stream speech in real-time:Using the Helper Function
The SDK provides a helper to save streams directly:Async Client
For web servers and high-concurrency applications, use the async client:Choosing a Model
Camb.ai offers three MARS models optimized for different use cases:- MARS pro
- MARS Pro
- MARS Instruct
Listing Available Voices
Discover available voices for your application:Language Support
Camb.ai supports 140+ languages. Specify the language using standard locale codes: Languages supported by each model mentioned at MARS Models.Error Handling
Handle common errors gracefully:Using Custom Provider
For more details check this guide Custom Cloud ProvidersBaseten Deployment
Initialize the client with your API key and the specific model URL. Baseten Provider ExampleNext Steps
Voice Agents
Build real-time voice agents with Pipecat
LiveKit Integration
Create voice agents with LiveKit
API Reference
Explore the full TTS API
Voice Library
Browse available voices