Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

ElevenLabsTTS

Text-to-speech with ElevenLabs voices, using your own ElevenLabs key. Choose it for expressive, natural voices, voice cloning and wide language support. Authenticates with ELEVENLABS_API_KEY from your environment, or an explicit api_key.

Fields

str
default:"UNSET"
ElevenLabs voice model, e.g. “eleven_flash_v2_5” or “eleven_turbo_v2”. “eleven_v3” and “eleven_v4” are synthesized over HTTP streaming. Defaults to ‘eleven_flash_v2_5’.
str
default:"hpp4J3VqNfWAUOO0d1Us"
ElevenLabs voice ID, from the voice library or your own cloned voices. Defaults to ‘hpp4J3VqNfWAUOO0d1Us’.
float
default:"UNSET"
Speaking rate, 0.7 to 1.2, where 1.0 is normal. Defaults to 1.0.
str
default:"UNSET"
Output audio format as codec_samplerate, e.g. “pcm_16000”, “pcm_24000” or “mp3_44100_128”. Defaults to ‘pcm_24000’.
Mapping[str, Any] | None
default:"UNSET"
Fine-grained voice controls as a dict, e.g. stability, similarity_boost, style and use_speaker_boost. Defaults to None (not set).
str
default:"UNSET"
Base URL of the ElevenLabs API. Change it only for a custom or regional endpoint. Defaults to ‘https://api.elevenlabs.io/v1’.
bool
default:"UNSET"
Whether to stream text to ElevenLabs over a websocket for the lowest latency, instead of one HTTP request per chunk. Defaults to True.
int
default:"UNSET"
Seconds an idle streaming connection stays open before ElevenLabs closes it, at most 180. Defaults to 180.
str
default:"UNSET"
Language as an ISO 639-1 code, e.g. “en” or “de”. Enforced only on multilingual models such as eleven_flash_v2_5. Defaults to ‘en’.
bool
default:"UNSET"
Whether SSML tags in the text, such as <break time=“1s”/>, are interpreted instead of spoken. Defaults to False.
Literal['auto', 'on', 'off']
default:"UNSET"
Whether numbers, dates and abbreviations are spelled out: “auto”, “on” or “off”. On flash and turbo v2.5 models, “on” needs an Enterprise plan. Defaults to ‘auto’.
bool
default:"UNSET"
Lower latency by having ElevenLabs speak each text chunk right away. Turn off only if you send raw mid-sentence tokens and want buffering for better prosody. Defaults to True.
bool
default:"UNSET"
Whether to return timing for each spoken word, e.g. for captions or syncing visuals. Defaults to False.