Python SDK:
Github Link: Camb AI Python SDK Installation Command:Node SDK:
Github Link: Camb AI Node SDKCore Components
1. AsyncCambAI (Asynchronous Client)
The non-blocking client built on httpx.AsyncClient and asyncio. Ideal for web servers (FastAPI, Sanic), real-time applications, and high-concurrency scenarios.
2. CambAI (Synchronous Client)
The standard blocking client. Use this for scripts, data processing pipelines, or applications where concurrency is managed via threads or isnโt a priority.
Supported Models & Architecture
MARS Pro (48kHz)
The flagship model. It consists of two main stages:- Prosody Model: Generates the rhythm, stress, and intonation of speech.
- Decoder: Converts these features into high-fidelity 48kHz audio.
MARS Flash (22.05kHz)
A distilled, faster version of MARS.- Lower Latency: optimized for near-real-time responses.
- Sample Rate: 22.05kHz.
MARS Instruct (22.05kHz)
Designed for fine-grained control over the output.- Instruction Following: Can take specific style or tone instructions.
Handling Streaming Responses
Both clients support streaming to handle large audio files efficiently or play audio as it generates.- Sync: Returns a standard
Iterator[bytes]. - Async: Returns an
AsyncIterator[bytes].