LiteLLM icon

LiteLLM

Interact with LiteLLM Gateway API

Actions8

Audio → Text-to-Speech

AI-generated

Summary

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 as response_format and 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 the x-litellm-api-key header. Downstream nodes read the audio from binary property data. If the request fails and Continue On Fail is enabled, the item contains error and statusCode fields 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.

Links

Discussion