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 explicitapi_key.
Fields
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’.
ElevenLabs voice ID, from the voice library or your own cloned voices. Defaults to ‘hpp4J3VqNfWAUOO0d1Us’.
Output audio format as codec_samplerate, e.g. “pcm_16000”, “pcm_24000” or “mp3_44100_128”. Defaults to ‘pcm_24000’.
Fine-grained voice controls as a dict, e.g. stability, similarity_boost, style and use_speaker_boost. Defaults to None (not set).
Base URL of the ElevenLabs API. Change it only for a custom or regional endpoint. Defaults to ‘https://api.elevenlabs.io/v1’.
Whether to stream text to ElevenLabs over a websocket for the lowest latency, instead of one HTTP request per chunk. Defaults to True.
Seconds an idle streaming connection stays open before ElevenLabs closes it, at most 180. Defaults to 180.
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’.
Whether SSML tags in the text, such as <break time=“1s”/>, are interpreted instead of spoken. Defaults to False.
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’.
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.