Reference · Tools
OpenAI TTS
Convert text to natural speech using OpenAI TTS.
OpenAI TTS turns text into natural-sounding speech, offering ten voices, six output formats and playback speed from 0.25x to 4.0x, delivered as binary audio. A typical build is generating an audio version of each published article for accessibility.
- Node type
- Action (binary)
- Parameters
- 6
- Outputs
- Output, Error
- Credentials
- OpenAI
OpenAI TTS
Convert text to natural speech using OpenAI TTS.
Overview
OpenAI TTS uses the Audio Speech API (POST /audio/speech) to convert text into natural-sounding audio. Supports configurable model selection, 10 distinct voices (alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer), multiple output formats (mp3, opus, aac, flac, wav, pcm), and adjustable speed (0.25x to 4.0x). Returns the generated audio as binary data on the output item.
Category: AI
Tool Name: openai_tts
Version: 1
Appearance: Icon: openai | Color: #10a37f
Node Type
Action (Binary) — handles file/binary data operations
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires OpenAI credentials. See the Credentials Guide for setup instructions.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Model | options | No | (current default) | The text-to-speech model to use. Always uses the latest version (auto-updated). The pre-filled option is the recommended default; the other options trade generation speed against audio fidelity. |
| Options: the OpenAI text-to-speech models available to your workspace — pick one from the dropdown. | ||||
| Text | string | Yes | — | The text to convert to speech. If empty, falls back to item.json.text or item.json.message. Supports expressions. |
| Voice | options | No | alloy | The voice to use for speech synthesis. |
Options: alloy (neutral and balanced), ash (warm and engaging), ballad (expressive and dramatic), coral (clear and informative), echo (smooth and resonant), fable (storytelling voice with character), nova (friendly and upbeat), onyx (deep and authoritative), sage (calm and wise), shimmer (bright and energetic) | ||||
| Options | collection | No | {} | Optional audio settings — add only the fields you need. |
| — Response Format | options | No | mp3 | The audio format for the generated speech. |
Options: mp3 (standard MP3), opus (low-latency streaming), aac (Advanced Audio Coding), flac (lossless), wav (uncompressed PCM in a WAV container), pcm (raw PCM samples) | ||||
| — Speed | number | No | 1 | Playback speed multiplier (0.25 to 4.0). 1.0 is normal speed. |
| — Binary Property Name | string | No | data | Property name under which the binary audio data will be stored. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. |
| Include Input | boolean | No | false | Whether to include the original input item fields in the output alongside the audio metadata. |
| Max Concurrency | number | No | 5 | Maximum number of items to process concurrently. |
Output Data
One output item per input item. The audio itself is binary data on the output item, written to the property named by Binary Property Name (data by default) as speech.<format>, merged alongside any binary the item already carried. The item JSON describes the synthesis:
{
"voice": "alloy",
"model": "the text-to-speech model that was used",
"format": "mp3",
"textLength": 412
}
textLengthis the character count of the text that was spoken — useful for cost tracking and for spotting empty inputs.- The audio never appears in the item JSON. Send it onward with a node that consumes binary data (write to file, upload to storage, attach to an email) and reference it by the same binary property name.
- The rest of the input item JSON is dropped unless Include Input is on.
Usage Examples
- Convert text to speech using OpenAI TTS
- Generate an MP3 audio file from text with the Nova voice
- Create high-quality speech audio for narration
- Synthesize audio in Opus format at 1.5x speed
- Generate voiceover audio for each row in a dataset
Example Configuration
Speak the text field of each item with the defaults:
{
"type": "openai_tts",
"parameters": {
"text": "{{ $json.text }}"
}
}
Narration in a lossless format at a slower pace:
{
"type": "openai_tts",
"parameters": {
"text": "{{ $json.script }}",
"voice": "fable",
"options": {
"responseFormat": "flac",
"speed": 0.9,
"binaryPropertyName": "narration"
}
}
}
Short notification clips at volume, keeping the source record:
{
"type": "openai_tts",
"parameters": {
"text": "{{ $json.message }}",
"voice": "nova",
"includeInput": true,
"maxConcurrency": 10,
"options": {
"responseFormat": "opus",
"speed": 1.15
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
openai_tts converts text into natural-sounding speech via the OpenAI Audio Speech API, supporting ten distinct voices and six output formats with adjustable playback speed from 0.25x to 4.0x. Use it when a workflow needs to generate spoken audio from dynamic text, such as voice narration, audio notifications, or accessibility content. It produces binary audio data on the main output channel, with processing or API failures routed to the error channel.
Frequently asked questions
How many voices and formats are available?
Ten distinct voices and six output formats, so you can match both the character of the speech and the container the downstream system expects.
Can I change the pace?
Yes — playback speed is adjustable from 0.25x to 4.0x, useful for narration that needs to fit a fixed duration.
How does the audio arrive?
As binary data on the main output, ready to upload, attach to a message or store.
Which credential does it need?
An OpenAI credential.
Build with the OpenAI TTS node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need OpenAI credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.