> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fish Audio S2 Pro Text to Speech

The Fish Audio S2 Pro text-to-speech model converts text into natural speech, supporting reference voices, sampling control, segmentation, audio formats, and prosody control.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API key}}.
</ParamField>

## Request Body

<ParamField body="text" type="string" required={true}>
  The text to convert into speech. S2-Pro multi-speaker text can use tags such as \<|speaker:0|>Hello\<|speaker:1|>Hi there.
</ParamField>

<ParamField body="top_p" type="number" default={0.7}>
  Nucleus sampling diversity control.

  Value range: \[0, 1]
</ParamField>

<ParamField body="format" type="string" default="mp3">
  Output audio format.

  Available values: `wav`, `pcm`, `mp3`, `opus`
</ParamField>

<ParamField body="latency" type="string" default="normal">
  Latency tier.

  Available values: `low`, `normal`, `balanced`
</ParamField>

<ParamField body="prosody" type="object">
  Prosody control.

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="speed" type="number" default={1}>
      Speech speed multiplier.
    </ParamField>

    <ParamField body="volume" type="number" default={0}>
      Volume adjustment.
    </ParamField>

    <ParamField body="normalize_loudness" type="boolean" default={true}>
      Whether to normalize output loudness.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="normalize" type="boolean" default={true}>
  Normalize Chinese and English text.
</ParamField>

<ParamField body="references" type="object[]">
  Reference audio samples for zero-shot voice cloning.

  <Expandable title="properties" defaultOpen={true}>
    <ParamField body="text" type="string">
      Text corresponding to the reference audio.
    </ParamField>

    <ParamField body="audio" type="string">
      Reference audio, provided as base64 or a URL according to vendor support.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="mp3_bitrate" type="integer" default={128}>
  MP3 bitrate, in kbps.

  Available values: `64`, `128`, `192`
</ParamField>

<ParamField body="sample_rate" type="integer" nullable={true}>
  Output sample rate in Hz. If empty, the default value for the format is used: 48000 Hz for opus, and usually 44100 Hz for others.
</ParamField>

<ParamField body="temperature" type="number" default={0.7}>
  Expressiveness control.

  Value range: \[0, 1]
</ParamField>

<ParamField body="chunk_length" type="integer" default={300}>
  Text chunk size.

  Value range: \[100, 300]
</ParamField>

<ParamField body="opus_bitrate" type="integer" default={-1000}>
  Opus bitrate, in bps. -1000 indicates automatic.

  Available values: `-1000`, `24000`, `32000`, `48000`, `64000`
</ParamField>

<ParamField body="reference_id" type="string">
  Voice model ID; in multi-speaker scenarios, an array matching the speaker indices can be provided.
</ParamField>

<ParamField body="max_new_tokens" type="integer" default={1024}>
  Maximum number of audio tokens per chunk.
</ParamField>

<ParamField body="min_chunk_length" type="integer" default={50}>
  Minimum number of characters before chunking.

  Value range: \[0, 100]
</ParamField>

<ParamField body="repetition_penalty" type="number" default={1.2}>
  Penalty coefficient for reducing audio pattern repetition.
</ParamField>

<ParamField body="early_stop_threshold" type="number" default={1}>
  Early stopping threshold.

  Value range: \[0, 1]
</ParamField>

<ParamField body="condition_on_previous_chunks" type="boolean" default={true}>
  Use previous audio chunks as context.
</ParamField>

## Response Information

Generated audio.

Format: `binary`
