Stepfun.ai icon

Stepfun.ai

Convert Text Into Speech using Stepfun.ai's Model (TTS)

Stepfun.ai

AI-generated

Summary

Convert input text into a speech audio file URL using the Stepfun.ai text-to-speech model.

Inputs

  • Text (required) — The text string to convert to speech with a maximum length of 1000 characters.
  • Voice (required) — The voice identifier to use for speech synthesis, dynamically loaded from the Stepfun.ai API or default options.
  • Model (required) — The text-to-speech model to use; currently only 'step-tts-2' is available.
  • Output Format — The audio file format for the generated speech URL; options include mp3, opus, aac, flac, wav, or pcm, defaulting to mp3.

Output shape

a list of items each containing a JSON object with the original text input, voice, model, output format used, the creation timestamp, and the URL of the generated speech audio file

One output item is produced per input item or one item if no input is provided. The output includes a 'pairedItem' property when processing multiple input items to keep track of correspondence. Errors are thrown if required parameters are missing, if the output format is invalid, or if the API response lacks an audio URL.

Examples

Example 1: Convert a provided text string into spoken audio using a selected voice and model.

Set 'Text' with the string to synthesize, choose a 'Voice' from the available options loaded via API, confirm 'Model' as 'step-tts-2', and select an 'Output Format' such as 'mp3'. The node returns the URL of the audio file representing the speech.

Links

Discussion