voiceGeneration
Converts text to speech using the ElevenLabs TTS API. Returns the generated audio as a base64-encoded MP3 string. The voice_id is expected to come from the external_id field of a trained weight — the typical upstream chain is getWeights → voiceGeneration.
Concurrency is capped at 5 simultaneous API calls. Retries up to 3 times with exponential backoff (base 1s, multiplier 2×, max 16s).
Parameters
| Param | Type | Required | Constraints | Description |
|---|---|---|---|---|
text | string | Yes | 1–50,000 chars | Text to convert to speech |
voice_id | string | Yes | — | ElevenLabs voice ID, sourced from Weight.external_id |
model | string | No (default: eleven_turbo_v2_5) | — | TTS model: eleven_turbo_v2_5, eleven_multilingual_v2, eleven_flash_v2_5 |
stability | float | No (default: 0.5) | 0.0–1.0 | Voice stability. Higher = more consistent |
similarity_boost | float | No (default: 0.75) | 0.0–1.0 | Voice similarity boost. Higher = closer to original voice |
style | float | No (default: 0.0) | 0.0–1.0 | Voice expressiveness |
use_speaker_boost | boolean | No (default: true) | — | Enable speaker boost for better clarity |
Output
| Field | Type | Description |
|---|---|---|
audio_base64 | string | Base64-encoded MP3 audio data |
audio_format | string | Always "mp3" |
character_count | integer | Number of characters processed by the API |
voice_id | string | Voice ID used for generation |
model_used | string | TTS model used for generation |
Example
{
"id": "tts",
"type": "voiceGeneration",
"data": {
"label": "Voice Generation",
"isExecuted": false,
"handles": ["inputs", "outputs"],
"schema": {},
"params": {
"text": { "value": "{{ $input.text }}", "isExpression": true, "isAttachedToInputNode": false },
"voice_id": { "value": "{{ @getWeights.weight.external_id }}", "isExpression": true, "isAttachedToInputNode": false },
"model": { "value": "eleven_turbo_v2_5", "isExpression": false, "isAttachedToInputNode": false },
"stability": { "value": 0.5, "isExpression": false, "isAttachedToInputNode": false },
"similarity_boost": { "value": 0.75, "isExpression": false, "isAttachedToInputNode": false }
},
"inputs": [], "outputs": [], "errors": []
},
"position": { "x": 300, "y": 0 },
"isSelected": false,
"isDragging": false
}