Saltar al contenido principal

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​

NameTypeRequiredDescription
texttextYesThe text to speak
voice_idtextNoOptional per-item voice override, taking precedence over the configured voice_id
languagetextNoOptional per-item language override (BCP-47 or ISO 639-1)

Output ports​

NameTypeRequiredDescription
audio_datatextNoBase64-encoded synthesized audio
mime_typetextNoMIME type of the returned audio
formattextNoShort format name of the returned audio
bytesnumberNoSize of the decoded audio in bytes
voice_idtextNoVoice actually used, after defaults and overrides
providertextNoProvider that produced the audio
successbooleanNoWhether synthesis succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
ProviderproviderenumNoelevenlabselevenlabs, googleSpeech synthesis provider
Voicevoice_idstringNoProvider voice identifier. Empty uses the provider default.
LanguagelanguagestringNoBCP-47 or ISO 639-1 language code (for example es-ES, ca, en)
Output FormatformatenumNomp3mp3, wav, pcm, ulaw, oggAudio encoding to produce. Use ulaw for telephony.

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
API Keyapi_keysecretYesElevenLabs API key, or Google Cloud API key for the google provider

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
ModelmodelstringNoProvider model id. Empty uses the low-latency default (eleven_flash_v2_5 for ElevenLabs).
Sample Rate (Hz)sample_ratenumberNo0min 0; max 48000Output sample rate. 0 uses the provider default (8000 for ulaw).
Speaking RatespeednumberNo1min 0.25; max 4Speed multiplier around 1.0
StabilitystabilitynumberNo0.5min 0; max 1ElevenLabs voice stability; lower is more expressive, higher is more consistent
Similarity BoostsimilaritynumberNo0.75min 0; max 1ElevenLabs similarity to the original voice
API Endpointapi_urlstringNoOverride the provider endpoint. Use a Google EU regional endpoint to keep synthesis inside the EU.
Timeout (seconds)timeoutnumberNo60min 5; max 300Request timeout

Errors​

CodeDescription
API_KEY_REQUIREDNo API key configured for the selected provider
TEXT_REQUIREDThe text input was missing or empty
INVALID_PROVIDERprovider is not one of: elevenlabs, google
INVALID_FORMATformat is not one of: mp3, wav, pcm, ulaw, ogg
SYNTHESIS_FAILEDThe 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.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..