Fish Audio S2-Pro#
Fish Audio S2-Pro is a text-to-speech model served through /v1/audio/speech. It supports plain TTS, voice cloning with a reference clip, and streaming audio chunks.
Prerequisites#
Install sglang-omni by following Installation.
Fish Audio uses the Descript DAC codec, which is not included in the base
sglang-omni package. From the SGLang-Omni repository root, install its
model-specific dependencies:
uv pip install \
"descript-audiotools==0.7.2" \
"descript-audio-codec==1.0.0"
Then download the model:
hf download fishaudio/s2-pro
Server Configuration#
sgl-omni serve \
--model-path fishaudio/s2-pro \
--config examples/configs/s2pro_tts.yaml \
--port 8000
Reference audio encoding runs on GPU 0 in the preprocessing process by default, using the checkpoint’s FP32 codec. Tokenization and audio loading remain on CPU. The preprocessing process has a 6 GiB PyTorch allocator limit; this is a memory budget, not a reference-duration limit or a reservation of all GPU allocations. Long references can exceed it and fail encoding.
Set --preprocessing.total_reserve_bytes 8GiB to increase the budget, while
leaving enough GPU memory for the autoregressive engine and vocoder. To encode
references on CPU instead, clear both the GPU placement and its budget:
sgl-omni serve \
--model-path fishaudio/s2-pro \
--config examples/configs/s2pro_tts.yaml \
--preprocessing.gpu null \
--preprocessing.total_reserve_bytes null \
--port 8000
Synthesize Speech#
Plain TTS:
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "fishaudio/s2-pro",
"voice": "default",
"input": "Hello, how are you?"
}' \
--output output.wav
Voice cloning:
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "fishaudio/s2-pro",
"voice": "default",
"input": "Get the trust fund to the bank early.",
"references": [{
"audio_path": "https://huggingface.co/datasets/zhaochenyang20/seed-tts-eval-mini/resolve/main/en/prompt-wavs/common_voice_en_10119832.wav",
"text": "We asked over twenty different people, and they all said it was his."
}]
}' \
--output output.wav
Streaming:
curl -N -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"model": "fishaudio/s2-pro",
"voice": "default",
"input": "Get the trust fund to the bank early.",
"references": [{
"audio_path": "https://huggingface.co/datasets/zhaochenyang20/seed-tts-eval-mini/resolve/main/en/prompt-wavs/common_voice_en_10119832.wav",
"text": "We asked over twenty different people, and they all said it was his."
}],
"stream": true,
"response_format": "pcm"
}' \
--output output.pcm
Request Parameters#
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
string |
served model |
Served model identifier |
|
string |
required |
Text to synthesize |
|
string |
|
Voice identifier for non-reference requests |
|
string |
|
Output audio format |
|
float |
|
Playback speed multiplier |
|
bool |
|
Stream raw PCM audio chunks |
|
list |
|
Reference clip for voice cloning. Each item has |
|
string |
|
Shorthand for |
|
int |
|
Maximum generated semantic tokens |
|
float |
|
Sampling temperature |
|
float |
|
Top-p sampling |
|
int |
|
Top-k sampling. It must be |
|
float |
|
Repetition penalty |
Known Limitations#
top_kis constrained to-1or1..30; keep requests inside this range because invalid values currently fail the S2-Pro pipeline instead of returning a clean parameter error.Reference quality strongly affects cloned voice quality.
Use streaming for interactive playback; CLI inspection of raw audio responses is awkward.