fish_generate_audio
Convert text into spoken audio using Fish TTS neural voices. Generate AI narration by selecting voice model and output format for your use case.
Instructions
Generate speech audio from text using Fish TTS.
Use this when:
- You want to convert text to speech
- You need AI-generated audio narration
Returns:
JSON response containing task_id and audio data when complete.
Example:
fish_generate_audio(
text="Hello, welcome to our service!",
reference_id="d7900c21663f485ab63ebdb7e5905036"
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The text to synthesize. Required. | |
| model | No | The TTS model to use. Supported values: 's1', 's2-pro', 's2.1-pro'. | s2-pro |
| top_p | No | Top-p nucleus sampling parameter. | |
| format | No | Output audio format. Defaults to 'mp3'. | mp3 |
| prompt | No | Deprecated alias for `text`. | |
| latency | No | Latency mode. Supported values: 'normal', 'balanced'. | |
| prosody | No | Prosody overrides forwarded to the upstream. | |
| voice_id | No | Deprecated alias for `reference_id`. | |
| normalize | No | Whether the upstream should apply text normalization. | |
| references | No | Inline reference samples forwarded to the upstream. | |
| mp3_bitrate | No | MP3 bit rate when format='mp3'. Supported values: 64, 128, 192. | |
| sample_rate | No | Sampling rate of the output audio (e.g. 16000, 22050, 44100). | |
| temperature | No | Sampling temperature (0.0-1.0). | |
| callback_url | No | Optional callback URL to receive the result asynchronously. If provided, the API returns immediately with a task_id. | |
| chunk_length | No | Chunk length passed through to the upstream synthesiser. | |
| reference_id | No | Voice model id (single speaker). Default example voice model ID: d7900c21663f485ab63ebdb7e5905036. | |
| max_new_tokens | No | Maximum number of new tokens to generate. | |
| min_chunk_length | No | Minimum chunk length. | |
| repetition_penalty | No | Repetition penalty applied during generation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |