1. Tasks
  2. Text To Speech

Tasks

Text To Speech

Converts text input into spoken audio using AI voice models. Useful for dynamic voice generation, automated responses, and media creation.

Basic Usage

Task to generate an audio file from text input.

loading...

Parameters

input
required
string

The text that will be converted into speech.

voice
optional
string

The voice model to use for the generated audio. Options are alloy, echo, fable, onyx, nova, and shimmer.

model
optional
string

The specific text-to-speech model version to use. Options are tts-1 or tts-1-hd.

filename
optional
string

The name of the file saved on Stubber. Do not include a file extension; the system appends this automatically based on the response format.

response_format
optional
string

The audio file format to generate. Options are mp3, opus, aac, flac, wav, and pcm.

speed
optional
number

The playback speed of the generated speech. The value must be between 0.25 and 4.0.

Default: 1.0

disable_model_response
optional
boolean

If set to true, the model will not automatically post the generated audio in a feedback action. The file will still be generated and available within the task response payload.

Result

loading...

Properties

request

The configuration parameters applied during the audio generation process, echoing back the supplied variables.


speech

The generated file's metadata object. This includes essential file routing information such as the filename, fileuuid, and contentType, which can be referenced by subsequent tasks (like attach_file).