generate_speech
Convert text into expressive character dialogue and voice acting, with emotional profiles and fine-tuned delivery settings. Runs asynchronously, returning job IDs for polling.
Instructions
Generate spoken dialogue / character voice acting.
Returns a job_id immediately; poll with check_jobs([job_id]) for the file path. Fire several calls to voice a whole scene without waiting.
Two ways to shape delivery, and they combine:
A
profile— a saved persona/mood preset. Built-ins: neutral, narrator, calm, whisper, sad, angry, excited, shout (see list_profiles). Save your own with save_profile. A profile just presets the knobs below.The precision knobs — any of these override the profile for this one line. Emotion can also be written inline as Eleven v3 audio tags, e.g. "[whispers] they're coming... [shouts] run!".
Args: text: The line(s) to speak, optionally with inline v3 audio tags. voice: An ElevenLabs voice name (see list_voices) or a voice id. Overrides any voice pinned by the profile. Omit for the default voice. profile: A saved/built-in profile name to preset delivery. model: Model id (default eleven_v3 for expressive character acting). stability: v3 delivery mode — "creative" (most expressive/tag-responsive), "natural" (balanced), or "robust" (locked-in) — or a 0-1 float. style: 0-1, amplifies the speaker's stylistic character (default 0). speed: Playback speed, 1.0 = normal (roughly 0.7-1.2 is usable). similarity_boost: 0-1, adherence to the reference voice (default 0.75). use_speaker_boost: Boost speaker similarity (slightly higher latency). seed: Fix sampling (0-4294967295) for more reproducible takes. Best-effort, NOT bit-exact (especially on v3) — a character's identity comes from its voice and settings, not the seed. previous_text / next_text: Surrounding lines, for prosody continuity in a scene. language_code: ISO 639-1 code to pin the language (not for multilingual_v2). with_timestamps: Also return per-character alignment (word/char timings) as a sidecar JSON next to the audio — for lip-sync, captions, and cut timing. variants: Generate N takes of this line in parallel (2-8) so a human can pick the best — v3 varies run-to-run. Returns {"job_ids": [...]} instead of one job_id. pronunciation: One or more pronunciation-dictionary names (or ids) to apply so lore names/terms are said a fixed way — up to 3. Create one with create_pronunciation_dictionary. engine: Provider override. Defaults to ElevenLabs for speech. format: Output format ("mp3" default, "wav"/PCM where the tier supports it).
Returns: {"job_id": ..., "status": "queued", "engine": ...} or {"error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| text | Yes | ||
| model | No | ||
| speed | No | ||
| style | No | ||
| voice | No | ||
| engine | No | ||
| format | No | ||
| profile | No | ||
| variants | No | ||
| next_text | No | ||
| stability | No | ||
| language_code | No | ||
| previous_text | No | ||
| pronunciation | No | ||
| with_timestamps | No | ||
| similarity_boost | No | ||
| use_speaker_boost | No |