Generate speech from text
Generates speech audio from the provided text using the specified text-to-speech model.
The request is billed according to the selected model and the amount of input text.
The generated audio is returned directly in the response body.
Authorizations
Enter the API key with the Bearer: prefix, e.g. "Bearer "
Path Parameters
The workspace ID used for billing and routing.
^[a-f0-9]{24}$Body
The text that should be converted into speech.
The input must contain between 1 and 4096 characters.
1 - 4096"Hello, this is a text to speech test."
The text-to-speech model to use.
The model must be one of the TTS models supported by the API.
"fish-audio/s1"
Optional voice identifier supported by the selected TTS model.
"default"
The format of the generated audio.
pcm is used by default.
mp3, pcm "pcm"
The speed of the generated speech.
Values must be between 0.25 and 4.0.
0.25 <= x <= 41
Optional references that can be provided to the TTS model.
References may contain either audio or text input.
Audio input reference used by supported TTS models.
The exact fields depend on the inputReferenceAudio Joi schema.
- Option 1
- Option 2
Optional provider-specific configuration.
Response
Successfully generated speech audio.
The response is of type file.
