Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
CambAITTS
CambAI Text-to-Speech provider. Synthesizes speech via the CambAI MARS TTS API, offering multilingual neural voices with support for emotional tone control, accents, and customizable voice characteristics.Constructor
CambAI API key for authentication. Falls back to the
CAMBAI_API_KEY environment variable when omitted.Integer voice identifier from the CambAI voice catalog. Defaults to
147320. Numeric IDs can be retrieved from the CambAI dashboard or the voices API endpoint.CambAI TTS model name. Defaults to
"mars-pro", which is the primary MARS 8 high-quality model.PCM output sample rate in Hz. Defaults to
24000.aclose
emit
The event to emit.
interrupt
off
The event the handler was registered for.
The handler to remove.
on
callback is omitted.
The event to listen for.
The handler to invoke when the event is emitted. If
None, a decorator is returned that registers the decorated function.The registered callback when
callback is provided, otherwise a decorator that registers and returns the function it wraps.on_first_audio_byte
A callable, optionally async, invoked with synthesis timing information when the first audio byte is emitted.
synthesize
The text to synthesize; coerced to a string if needed.