Skip to main content
POST
Fish Audio Text-to-Speech
For best results, we recommend using audio cloning to upload reference audio before using this API. This will improve speech quality and reduce latency.
Fish Audio converts text into speech. Supported audio formats:
  • WAV / PCM
    • Sample rates: 8kHz, 16kHz, 24kHz, 32kHz, 44.1kHz
    • Default sample rate: 44.1kHz
    • 16-bit, mono
  • MP3
    • Sample rates: 32kHz, 44.1kHz
    • Default sample rate: 44.1kHz
    • Mono
    • Bitrates: 64kbps, 128kbps (default), 192kbps
  • Opus
    • Sample rate: 48kHz
    • Default sample rate: 48kHz
    • Mono
    • Bitrates: -1000 (automatic), 24kbps, 32kbps (default), 48kbps, 64kbps

Request Headers

string
required
Enum value: application/json
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

string
required
The text to convert to speech.
number
Controls the randomness of speech generation. Higher values (for example, 1.0) make the output more random, while lower values (for example, 0.1) make it more deterministic. We recommend using 0.9 for the s1 model.Required range: 0 <= x <= 1
number
Controls diversity through nucleus sampling. Lower values (for example, 0.1) make the output more focused, while higher values (for example, 1.0) allow more diversity. We recommend using 0.9 for the s1 model.Required range: 0 <= x <= 1
ReferenceAudio · object[] | null
Reference audio for the voice. This requires MessagePack serialization and will override reference_voices and reference_texts.
string | null
The reference model ID for the voice.
ProsodyControl · object
Prosody control for the voice.
integer
default:200
The chunk length for the voice.Required range: 100 <= x <= 300
boolean
default:true
Whether to normalize the speech. This will reduce latency, but may reduce performance when handling numbers and dates.
enum<string>
default:"mp3"
The format for the speech.Optional values: wav, pcm, mp3, opus
integer | null
The sample rate for the speech.
enum<integer>
default:128
The MP3 bitrate for the speech.Optional values: 64, 128, 192
enum<integer>
default:32
The Opus bitrate for the speech.Optional values: -1000, 24, 32, 48, 64
enum<string>
default:"normal"
The latency setting for the speech. balanced reduces latency but may cause performance degradation.Optional values: normal, balanced

Response Information

The API will directly return an audio stream in the format specified by the format parameter (default: mp3).