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
Async Decode#
On CUDA, enable one-step async decode to overlap CPU result collection with the next GPU decode step:
sgl-omni serve \
--model-path fishaudio/s2-pro \
--config examples/configs/s2pro_tts.yaml \
--tts_engine.factory.enable_async_decode true \
--port 8000
This is opt-in. A decode batch enters the lookahead path only after its request rows stabilize; prefill and batch changes use synchronous decoding. Before selecting an expected prefill batch, the scheduler resolves any pending decode so selection uses the updated request state. The GPU updates the previous codebooks, semantic repetition history, and sampling step before the next forward starts. The existing overlap scheduler remains disabled.
One decode step may already be in flight when the host observes a request completion. The effective CUDA Graph batch size can therefore shrink one step later than in synchronous decoding. Different batch sizes can produce different floating-point results and generated codes, even with the same seed.
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:
See the non-streaming Fish Speech voice cloning request.
Streaming:
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.