Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
CartesiaTTS
Low-latency streaming text-to-speech with Cartesia’s Sonic models. Choose it for fast, natural voices in many languages, with voice controls on Sonic 3 and newer. Authenticates with CARTESIA_API_KEY from your environment, or an explicitapi_key.
Fields
Voice model to synthesize with, e.g. “sonic-3.5” or a dated snapshot like “sonic-3.5-2026-05-04” to pin a version. Defaults to ‘sonic-3.5’.
Cartesia voice ID (a UUID) from the Cartesia voice library or your own cloned voices. Defaults to ‘f8f5f1b2-f02d-4d8e-a40d-fd850a487b3d’.
Language code of the text, e.g. “en”, “hi”, “es” or “ja”. Sonic 3.5 supports 42 languages. Defaults to ‘en’.
Base URL of the Cartesia API. Change only for a proxy or private deployment. Defaults to ‘https://api.cartesia.ai’.
Voice controls such as {“speed”: 1.1, “volume”: 1.0, “emotion”: “excited”}. Sonic 3 and newer only; only the keys you set are sent. Defaults to None (not set).
ID of a custom pronunciation dictionary created in your Cartesia account. Defaults to None (not set).
Deprecated and ignored; buffering is now paced by sentence. Defaults to None (not set).
Set to True to receive per-word timestamps for syncing transcripts with audio. Defaults to False.