Actions8
- Chat Actions
- Completion Actions
- Embedding Actions
- Image Actions
- Audio Actions
- Model Actions
- Moderation Actions
Audio → Text-to-Speech
AI-generatedSummary
Converts input text to spoken audio via the LiteLLM gateway's /audio/speech endpoint and returns the result as a binary audio file on the output item.
Inputs
- Model (required) — TTS model name as configured in the LiteLLM gateway. Defaults to tts-1.
- Input (required) — Text to synthesize. Throws an error if empty or whitespace-only.
- Voice (required) — Voice to use: alloy, echo, fable, onyx, nova, or shimmer. Defaults to alloy.
- Additional Fields — Optional collection. Speed (0.25–4.0) is sent as
speed. Response Format (mp3, opus, aac, flac) is sent asresponse_formatand sets the output file extension and MIME type. Defaults to mp3 when not set.
Output shape
One item per input item, with an empty json object and the audio in the binary property data. The file is named audio.<format>.
MIME types are mp3 → audio/mpeg, opus → audio/ogg, aac → audio/aac, flac → audio/flac. The credentials (
liteLLMApi) supply the base URL and API key, which is sent in thex-litellm-api-keyheader. Downstream nodes read the audio from binary propertydata. If the request fails and Continue On Fail is enabled, the item containserrorandstatusCodefields instead.
Examples
Example 1: Turn a generated article summary into a narrated MP3.
Model: tts-1, Input: {{ $json.summary }}, Voice: nova, with no additional fields (defaults to mp3).
Example 2: Produce a faster FLAC voiceover for later processing.
Model: tts-1, Input: script text, Voice: onyx, Additional Fields: Speed 1.25, Response Format flac.