Automations

Text-to-Speech Node

4 min readnode-ai-tts

Convert a text variable to an MP3 audio file using OpenAI TTS — use the audio URL in a WhatsApp voice note node downstream.

Text-to-Speech Node

Converts a text string to spoken MP3 audio using OpenAI's TTS API. The audio file is saved to the server and the URL is stored as a variable — pipe it into a WhatsApp Send Media node to send a voice note.

---

Fields
FieldRequiredDescription
inputYesText to synthesise. Max 4000 characters. Supports {{variables}}
voiceNoalloyechofableonyxnovashimmer (default: alloy)
outputVarNoVariable to store the audio URL (default: audioUrl)

Requires: OPENAI_API_KEY environment variable set in your deployment.

---

Output
VariableDescription
{{variables.audioUrl}}Relative URL to the MP3 file (e.g. /uploads/tts/tts-1234.mp3)

---

Example: WhatsApp voice reply

whatsapp.received → ai.llm (generate response text → variables.reply) → ai.text_to_speech (input: {{variables.reply}} → variables.audioUrl) → wa.send_media (url: {{variables.audioUrl}}, mediaType: audio)

---

Voice guide
VoiceCharacter
alloyNeutral, balanced — good general purpose
echoDeep, male-presenting
fableBritish accent, storytelling tone
novaFemale, warm and conversational
shimmerSoft, gentle — good for support bots