Text to Speech
Category: AI & ML
Node id: text-to-speech
Maturity: beta
Risk tier: B
Standards: HIPAA, GDPR
Synthesizes speech from text using ElevenLabs or Google Cloud Text-to-Speech, with per-call voice and language selection and telephony-ready output formats (8 kHz μ-law) alongside mp3 and PCM.
What it does
- Speech synthesis via ElevenLabs (flash and multilingual models)
- Speech synthesis via Google Cloud Text-to-Speech
- Telephony-ready 8 kHz μ-law output for carrier media
- Per-item voice and language override from upstream node outputs
- EU-resident synthesis by pointing api_url at a Google regional endpoint
- Voice tuning: stability, similarity boost and speaking rate
Use cases
- Speak an appointment reminder to a patient during an automated call
- Render the agent side of a voice-call workflow into carrier audio
- Produce audio versions of patient instructions for accessibility
- Generate IVR prompts in Spanish, Catalan and English from one pipeline
Runtime
- Performance tier:
medium - Execution mode:
batch - Default timeout: 60 seconds
- Retryable: Yes (default 2 retries)
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
text | text | Yes | The text to speak |
voice_id | text | No | Optional per-item voice override, taking precedence over the configured voice_id |
language | text | No | Optional per-item language override (BCP-47 or ISO 639-1) |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
audio_data | text | No | Base64-encoded synthesized audio |
mime_type | text | No | MIME type of the returned audio |
format | text | No | Short format name of the returned audio |
bytes | number | No | Size of the decoded audio in bytes |
voice_id | text | No | Voice actually used, after defaults and overrides |
provider | text | No | Provider that produced the audio |
success | boolean | No | Whether synthesis succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Provider | provider | enum | No | elevenlabs | elevenlabs, google | Speech synthesis provider |
| Voice | voice_id | string | No | Provider voice identifier. Empty uses the provider default. | ||
| Language | language | string | No | BCP-47 or ISO 639-1 language code (for example es-ES, ca, en) | ||
| Output Format | format | enum | No | mp3 | mp3, wav, pcm, ulaw, ogg | Audio encoding to produce. Use ulaw for telephony. |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| API Key | api_key | secret | Yes | ElevenLabs API key, or Google Cloud API key for the google provider |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Model | model | string | No | Provider model id. Empty uses the low-latency default (eleven_flash_v2_5 for ElevenLabs). | ||
| Sample Rate (Hz) | sample_rate | number | No | 0 | min 0; max 48000 | Output sample rate. 0 uses the provider default (8000 for ulaw). |
| Speaking Rate | speed | number | No | 1 | min 0.25; max 4 | Speed multiplier around 1.0 |
| Stability | stability | number | No | 0.5 | min 0; max 1 | ElevenLabs voice stability; lower is more expressive, higher is more consistent |
| Similarity Boost | similarity | number | No | 0.75 | min 0; max 1 | ElevenLabs similarity to the original voice |
| API Endpoint | api_url | string | No | Override the provider endpoint. Use a Google EU regional endpoint to keep synthesis inside the EU. | ||
| Timeout (seconds) | timeout | number | No | 60 | min 5; max 300 | Request timeout |
Errors
| Code | Description |
|---|---|
API_KEY_REQUIRED | No API key configured for the selected provider |
TEXT_REQUIRED | The text input was missing or empty |
INVALID_PROVIDER | provider is not one of: elevenlabs, google |
INVALID_FORMAT | format is not one of: mp3, wav, pcm, ulaw, ogg |
SYNTHESIS_FAILED | The provider rejected the request or returned no audio |
Runtime notes
- audio_data is base64-encoded — decode it before writing to a file or handing it to a carrier
- format=ulaw returns 8 kHz μ-law, the encoding telephony carriers expect; every other format is for playback or storage
- voice_id and language inputs override the configured values, so one node can serve a multi-language run
- ElevenLabs voice ids are opaque strings; Google voice names carry their language as a prefix (es-ES-Neural2-A) and set the language automatically
- stability, similarity and model apply to ElevenLabs only; Google ignores them
- Provider choice is a data-residency decision: ElevenLabs processes in the US, Google Cloud TTS can be pinned to an EU endpoint via api_url
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Something unclear? Send documentation feedback by email.