Overview
The Camb.ai Go 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 or load it directly in your code.
Quick Start
Streaming Text-to-Speech
Generate and stream speech in real-time:Using the Helper Function
Since the SDK returns anio.Reader, you can use this helper to save streams easily:
Choosing a Model
Camb.ai offers three MARS models optimized for different use cases:MARS Flash
Sample rate: 22.05kHz
MARS Pro
Sample rate: 48kHz
MARS Instruct
Sample rate: 22.05kHz
Listing Available Voices
Discover available voices for your application:Language Support
Camb.ai supports 140+ languages. Specify the language using the provided constants: 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