Create Speech

Go to Product

Generates audio from the input text.

Options

Body

Request body which must comply to the following JSON Schema:

{
  "required" : [ "input", "model", "voice" ],
  "type" : "object",
  "properties" : {
    "model" : {
      "description" : "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`\n",
      "anyOf" : [ {
        "type" : "string"
      }, {
        "type" : "string",
        "enum" : [ "tts-1", "tts-1-hd" ]
      } ],
      "x-oaiTypeLabel" : "string"
    },
    "input" : {
      "maxLength" : 4096,
      "type" : "string",
      "description" : "The text to generate audio for. The maximum length is 4096 characters."
    },
    "voice" : {
      "type" : "string",
      "description" : "The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).",
      "enum" : [ "alloy", "echo", "fable", "onyx", "nova", "shimmer" ]
    },
    "response_format" : {
      "type" : "string",
      "description" : "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`.",
      "default" : "mp3",
      "enum" : [ "mp3", "opus", "aac", "flac" ]
    },
    "speed" : {
      "maximum" : 4.0,
      "minimum" : 0.25,
      "type" : "number",
      "description" : "The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.",
      "default" : 1.0
    }
  },
  "additionalProperties" : false
}
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code
  • Transfer-Encoding: chunked

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.