Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api-reference/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Some endpoints add fields. For example, `transcribe-1-pro` and `transcribe-2-pro
| `402` | No API credit for the model you called | Add API credit on [API Billing](https://fish.audio/app/developers/billing/). New developer accounts may receive a one-time free API credit on [Get Started](https://fish.audio/app/developers/get-started/?utm_source=docs&utm_medium=errors&utm_content=signup-credit), which works with every model. |
| `403` | Not permitted for this key/resource | Check the key's scope and the resource owner. |
| `404` | Model or voice not found | Verify the `model_id` / `reference_id`. |
| `413` | Request body too large | Send a smaller request body. |
| `429` | Too many requests, for example when your account is at its [concurrency limit](/developer-guide/models-pricing/pricing-and-rate-limits#concurrent-request-limits) | Back off and retry (see below). |
| `5xx` | Server error | Retry with backoff; if it persists, contact support. |

Expand Down
2 changes: 1 addition & 1 deletion developer-guide/getting-started/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<Update label="Fish Audio S3 Pro" description="December 2, 2026" tags={["Fish Audio"]}>
## Fish Audio S3 Pro

Our most capable text-to-speech model, and the one we now recommend. S3 Pro is tied for #1 overall on the Artificial Analysis Speech Arena, is #1 on Artificial Analysis Pronunciation Robustness, scores 100% accuracy on the Cekura TTS benchmark, and has lower latency than S2.1-Pro, with a median server-side time to first audio of about 40 ms with `latency: "low"` (measured at the inference service, one request at a time, excluding network time). It costs $15.00 / M UTF-8 bytes, and TTFA, DPA, and zero data retention (ZDR) guarantees are available under an enterprise agreement. It has the same `[bracket]` natural-language control and multi-speaker dialogue as the S2 models, and accepts the paired scoped tags of Drama 3, such as `<whisper>…</whisper>`, to change the delivery of specific words.

Check warning on line 42 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Cekura'?

Use model ID `s3-pro` on `POST /v1/tts` and the TTS WebSocket. The Quick Start and cookbook examples now use `s3-pro`.
Use model ID `s3-pro` on `POST /v1/tts`, the with-timestamps routes (`POST /v1/tts/stream/with-timestamp` and the `/v1/tts/live/with-timestamp` WebSocket), and the TTS WebSocket. The Quick Start and cookbook examples now use `s3-pro`.

The free `s2.1-pro-free` model has been taken offline after its free period ended on November 30, 2026. Requests that still send it are served and billed as the default model. See [Model Deprecations](/developer-guide/models-pricing/deprecations).

Expand Down Expand Up @@ -167,7 +167,7 @@
<Update label="Live 3 full-duplex model" description="November 10, 2026" tags={["Fish Audio"]}>
## Live 3 full-duplex model

Live 3 is our full-duplex speech model for Voice Agents (`voice.engine: "live3"`). Instead of waiting for a caller to finish before generating speech, a single model listens while it speaks and decides when to backchannel, wait, respond, or stop on real interruptions and mid-turn corrections.

Check warning on line 170 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'backchannel'?

New agents start on Live 3 by default for English sessions. Choose from eight built-in Live 3 voices (`clara`, `nora`, `harper`, `patricia`, `owen`, `marco`, `milo`, `jonah`) or any Voice Library voice, and tune turn-taking with situation prompts (`P2` phone support, `DT` drive-thru, or `AIR` airline). Sessions in other languages automatically use the agent's cascade text-to-speech model.

Expand Down Expand Up @@ -197,7 +197,7 @@
<Update label="Realtime Speech to Text (transcribe-stream-1)" description="October 20, 2026" tags={["Fish Audio"]}>
## Realtime Speech to Text (`transcribe-stream-1`)

Stream live 16-bit PCM audio over `wss://api.fish.audio/v1/asr/realtime` for turn-by-turn transcription powered by `transcribe-stream-1`. Beyond live `draft` transcripts with `settled_text`, Smart Turn Detection (`auto`, `vad`, and `manual` modes) handles eager end-of-turn signals, backchannel detection, and background awareness, alongside conversation context (`context.terms`, `context_add`, `context.history`), speaker diarization, and optional sound event tags (`results.tag_audio_events`).

Check warning on line 200 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'backchannel'?

Check warning on line 200 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'diarization'?

Sessions run up to 60 minutes. `transcribe-stream-1` is also available as a speech recognition model in Voice Agents (`fish_audio:transcribe-stream-1`).

Expand Down Expand Up @@ -277,7 +277,7 @@
<Update label="Fish Audio S1" description="June 2025" tags={["Fish Audio"]}>
## Fish Audio S1

Historic rebrand from Fish Speech to Fish Audio. #1 ranking on TTS-Arena2 with industry-leading performance.

Check warning on line 280 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'rebrand'?

S1 (4B params): 0.008 WER, 0.004 CER - Available on Fish Audio Playground
S1-mini (0.5B params): 0.011 WER, 0.005 CER - Open source on Hugging Face
Expand Down Expand Up @@ -322,7 +322,7 @@

Infrastructure improvements focused on Docker optimization and multi-platform builds.

Updated PyTorch version and replaced audio backend from sox for better performance. Enhanced CI/CD pipeline with buildx support and fixed various Docker-related issues.

Check warning on line 325 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'sox'?

Check warning on line 325 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'buildx'?
</Update>

<Update label="v1.4.0" description="September 12, 2024" tags={["Fish Speech"]}>
Expand Down Expand Up @@ -360,7 +360,7 @@
<Update label="v1.1.1" description="June 8, 2024" tags={["Fish Speech"]}>
## v1.1.1

Breaking changes: Replaced zibai with uvicorn for API server, new text-splitter with byte-based length calculation, and license change to CC-BY-NC-SA 4.0.

Check warning on line 363 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'zibai'?

Check warning on line 363 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'uvicorn'?

Added Apple Silicon (MPS) support, Windows one-click installation, and automatic model downloading with resume capability. Improved WebUI with better file selection and download progress indicators.
</Update>
Expand All @@ -370,7 +370,7 @@

Added VITS decoder integration with full streaming support and queue management for real-time audio generation.

Introduced internationalization (i18n) with Spanish translation and improved Windows packaging. Optimized GPU memory usage and CPU-only inference performance while adding LoRA support to the Gradio UI.

Check warning on line 373 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Gradio'?
</Update>

<Update label="v1.0.0" description="April 30, 2024" tags={["Fish Speech"]}>
Expand All @@ -378,7 +378,7 @@

Major milestone release introducing new VQ-GAN architecture with VITS decoder support, LoRA fine-tuning, and streaming inference capabilities.

Breaking changes include removal of the Rust-based data server, new tokenizer replacing phonemizer, and updated model architecture (VQ + DiT + Reflow). Achieved 4x memory reduction during loading and added WebUI for training and annotation.

Check warning on line 381 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'phonemizer'?
</Update>

<Update label="v0.2.0" description="December 23, 2023" tags={["Fish Speech"]}>
Expand All @@ -386,5 +386,5 @@

First public release of Fish Speech featuring a complete text-to-speech pipeline with VQ-GAN audio codec and LLAMA-based language model.

Includes multi-language support (Chinese, English, Japanese), Gradio WebUI for inference, HTTP API server, and Docker support. Added special optimizations for Chinese users including mirror downloads and localized documentation.

Check warning on line 389 in developer-guide/getting-started/changelog.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Gradio'?
</Update>
2 changes: 1 addition & 1 deletion developer-guide/integrations/hermes-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
hermes fish login
```

`login` validates the key against your Fish Audio account and saves it to the active Hermes profile. Where no speech or transcription provider is set, it selects Fish Audio. In an interactive terminal, it asks before replacing another provider; noninteractively, it preserves an existing provider unless you pass `--yes`. Pass `--key-stdin` to read the key from standard input.

Check warning on line 55 in developer-guide/integrations/hermes-agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'noninteractively'?

You can also enter your key in Hermes Desktop (**Voices** > **Enter API key**, which opens **Settings** > **Plugins** > **Fish Audio** > **Agent settings**; on older Desktop builds, open the gear icon on the `fish-audio` row in **Capabilities** > **Plugins**) or with `hermes tools` > **Text-to-Speech** > **Fish Audio**. Never paste API keys into chat.

Expand Down Expand Up @@ -115,7 +115,7 @@
settings:
streaming: auto # auto | "off"
live_transcription: realtime # realtime | compat
allow_free_model: true # false = always use s2.1-pro
allow_free_model: true # false = never use s2.1-pro-free
```

Additional `plugins.entries.fish-audio.settings` options include `base_url` (an HTTPS URL, or HTTP on loopback, for a self-hosted Fish Audio endpoint) and `operator_account: true` (for operator-owned Fish accounts, hiding balances, billing links, and account-wide voices and dictionaries from end users).
Expand Down Expand Up @@ -156,10 +156,10 @@

### Terminal CLI

Run setup, diagnostics, and noninteractive scripting commands from your terminal:

Check warning on line 159 in developer-guide/integrations/hermes-agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'noninteractive'?

- **Setup and diagnostics**: `hermes fish login [--key-stdin] [--yes]`, `hermes fish status`, `hermes fish doctor [--no-synth]`, and `hermes fish use <voice>`
- **Scripting** (noninteractive; add `--json` for structured output with exit code `0` on success or `1` on failure): `hermes fish speak`, `hermes fish transcribe`, `hermes fish voices`, and `hermes fish balance`

Check warning on line 162 in developer-guide/integrations/hermes-agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'noninteractive'?

```bash
hermes fish speak "Hello from Hermes" --format mp3 --out hello.mp3 --json
Expand Down
28 changes: 26 additions & 2 deletions developer-guide/models-pricing/models/s3-pro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,35 @@

## Text normalization

`normalize` is on by default. S3 Pro uses context-aware text normalization: it reads numbers, dates, currencies, units, abbreviations, and symbols the way the surrounding text calls for. It covers the 11 Tier 1 languages today, and the list is actively growing. S3 Pro reads text in every other language natively, as written. `language` still works, and a regional tag such as `es-MX` or `zh-TW` is normalized with its base language. See [S3 Pro normalization](/features/text-to-speech#s3-pro-normalization).
This section and the ones after it, through [Generation settings](#generation-settings), describe the hosted API.

`normalize` is on by default. S3 Pro uses context-aware text normalization: it reads dates, times, numbers, currencies, units, phone numbers, URLs, abbreviations, and symbols the way the surrounding text calls for. `[bracket]` directions, speaker tags such as `<|speaker:0|>`, and phoneme markers are kept as written. So are scoped tags such as `<whisper>` and `</whisper>`, but the words between them are still normalized. It covers the 11 Tier 1 languages today, and the list is actively growing. S3 Pro reads text in every other language natively, as written. Send `normalize: false` to turn normalization off. `language` still works, and a regional tag such as `es-MX` or `zh-TW` is normalized with its base language. For Japanese, send `language: "ja"`: without it, text written only in kanji, with no kana, is normalized as Chinese. See [S3 Pro normalization](/features/text-to-speech#s3-pro-normalization).

## Markdown cleanup

S3 Pro removes Markdown formatting before it reads your text, so you can send a language model's reply as it is. This applies on `POST /v1/tts`, the with-timestamps routes, and the TTS WebSocket.

| You write | S3 Pro reads |
| ------------------------------------------------------------------------------------------------------------------- | ------------ |
| A link whose address starts with `http://`, `https://`, `www.`, or `mailto:`, such as `[text](https://example.com)` | `text` |
| An image, `![alt](https://example.com/a.png)` | Nothing |
| Bold or italics, `**text**`, `__text__`, or `*text*` | `text` |
| Inline code, `` `text` `` | `text` |
| A heading, `# text` | `text` |
| A list item, `- text`, `* text`, or `+ text`, including a task box such as `- [x] text` | `text` |
| A quote, `> text` | `text` |

Bare URLs, numbered lists, tables, code blocks, `[bracket]` directions, and `<|…|>` tags are left as written. So are other links, such as `[text](/path)`: their `[text]` is then taken as a `[bracket]` direction, so its words are not spoken.

### Reserved tokens

The `<|…|>` tokens you can write in your text are speaker tags (`<|speaker:0|>`) and [phoneme markers](/developer-guide/core-features/fine-grained-control) (`<|phoneme_start|>`, `<|phoneme_end|>`). The model's other reserved tokens in that form are removed before synthesis, with no error.

Text with nothing to read, such as an empty string, only punctuation (`...`), or only reserved tokens, is not an error either: `POST /v1/tts` returns `200` with no speech. A `wav` response holds only the file header, and an `mp3` response holds a few frames of silence.

## Generation settings

On `s3-pro`, sampling and chunking parameters are managed automatically by the service.
The service sets the sampling for `s3-pro`. `temperature`, `top_p`, and `repetition_penalty` are accepted and validated as on other models, but they don't change the audio. Chunking is managed automatically by the service.

## Supported languages

Expand Down Expand Up @@ -96,6 +120,6 @@

Broad multilingual coverage for short phrases and general use.

Odia, Tagalog, Gujarati, Romanian, Finnish, Cantonese, Norwegian, Slovak, Malay, Hungarian, Lithuanian, Latvian, Galician, Javanese, Uzbek, Armenian, Bulgarian, Macedonian, Basque, Slovenian, Uyghur, Estonian, Khmer, Sinhala, Maori, Assamese, Burmese, Latin

Check warning on line 123 in developer-guide/models-pricing/models/s3-pro.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Odia'?

Check warning on line 123 in developer-guide/models-pricing/models/s3-pro.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Uyghur'?

Check warning on line 123 in developer-guide/models-pricing/models/s3-pro.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Sinhala'?

<Support />
2 changes: 1 addition & 1 deletion developer-guide/models-pricing/models/transcribe-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- **Language hints**: `language` is passed to the model, which uses it to transcribe. It can be an ISO 639-1 or ISO 639-3 code, an English language name, or a locale such as `pt-BR`.
- **Text format**: `text_format` is `written` (the default) for digits and symbols, or `spoken` for numbers, dates, times, and amounts in words. When you also send key terms, `spoken` is not always followed.
- **Verbatim**: `verbatim` is `true` by default and keeps filler words, stutters, repetitions, and false starts. `false` leaves out filler sounds, stutters, accidental repetitions, and short false starts. It never rewords.
- **Key terms**: `keyterms` takes up to 128 words or short phrases, each at most 50 characters and 8 words, to spell as you list them.
- **Key terms**: `keyterms` takes up to 128 words or short phrases, each at most 50 characters and 8 words, to spell as you list them. See [Key terms](/api-reference/endpoint/openapi-v1/speech-to-text#key-terms) for every rule, including duplicates, the characters a term can't contain, and the total size.

Use it for subtitles for the deaf and hard of hearing (SDH), contact-center quality assurance, sales call analytics, or general transcription. See [Speech to Text](/features/speech-to-text).

Expand All @@ -34,7 +34,7 @@

`transcribe-stream-2` is built for cascaded voice agents, where speech recognition feeds a language model and a text-to-speech model speaks the reply. It serves the same realtime WebSocket as `transcribe-stream-1`, with the same messages and limits:

- **Smart Turn Detection**: eager end of turn, backchannel detection, and background awareness, so your agent knows when to answer, keep talking, or stop.

Check warning on line 37 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'backchannel'?
- **Conversation context**: send `context.history` and `context.terms` to guide the transcript.
- **Text format**: `results.text_format` in `config` sets the style for numbers, amounts, and times for the whole session. `transcribe-stream-1` does not take it.

Expand All @@ -61,7 +61,7 @@
| Metric | `transcribe-stream-2` | Next best | `transcribe-stream-1` |
|---|---|---|---|
| Time to first text, median | 401 ms (#1) | 485 ms, AssemblyAI Universal-3.6 Pro | 730 ms |
| Semantic word error rate | 0.19% (#1) | 0.23%, Inworld STT-1 | 0.27% |

Check warning on line 64 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Inworld'?
| Word error rate with TV noise | 18.09% | | 33.93% |

**[Speko STT benchmark](https://benchmarks.speko.ai/stt)**, streaming English conversations:
Expand All @@ -72,16 +72,16 @@
| Live words, median | 233 ms | 249 ms |
| End of turn, median | 906 ms | 1.12 s |

**Live evaluation against six other streaming providers**, November 2026: AssemblyAI, Cartesia, Deepgram, ElevenLabs, Reson8, and Soniox. We streamed the same frozen audio to every provider over its live WebSocket API, more than 25,000 streams in total, with no retries and no editing of the results.

Check warning on line 75 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Cartesia'?

Check warning on line 75 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Deepgram'?

Check warning on line 75 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Soniox'?

| Benchmark | `transcribe-stream-2` | Next best | `transcribe-stream-1` |
|---|---|---|---|
| Spelled email addresses, English and German: transcribed exactly | 89.0% (#1) | 79.0%, AssemblyAI 3.7 Realtime Agent | 5.5% |
| Spelled email addresses, captured correctly by an LLM agent from the transcript | 83.0% (#1) | 77.6%, AssemblyAI 3.7 Realtime Agent | 31.0% |
| Eager end of turn, median time after the speaker stops | 293 ms (#1) | 428 ms, AssemblyAI 3.7 Realtime Agent (end of turn, no eager mode) | 380 ms |
| Digit strings with natural pauses, 7 languages: kept in one turn | 98.4% (#1, tied) | 98.4%, Soniox stt-rt-v6 | 98.4% |

Check warning on line 82 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Soniox'?
| 8 kHz phone calls, US English and Mexican Spanish: utterance error rate, the share of utterances with at least one meaning-changing error (lower is better) | 7.22% (#1) | 7.51%, Reson8 Rumble-2 | 12.43% |
| Entities such as numbers, dates, and amounts written exactly (Cekura set, strict) | 80.9% (#1) | 76.6%, ElevenLabs Scribe v3 | 68.8% |

Check warning on line 84 in developer-guide/models-pricing/models/transcribe-2.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Cekura'?
| Accented English, 24 accents (EdAcc): word error rate (lower is better) | 9.96% (#1) | 10.14%, ElevenLabs Scribe v3 | 10.28% |

On 600 clips with babble, TV, and call-center noise, turning on speaker labels made no transcript worse.
Expand Down
23 changes: 15 additions & 8 deletions features/text-to-speech.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<CardGroup cols={2}>
<Card title="Voiceovers & narration" icon="film">
Audiobooks, explainers, ads, and video narration.

Check warning on line 26 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Audiobooks'?

Check warning on line 26 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'explainers'?
</Card>
<Card title="Conversational AI" icon="comments">
Speak an assistant's replies. Pair with [streaming](/features/text-to-speech/realtime) for low latency.
Expand All @@ -48,7 +48,7 @@
from fishaudio.utils import save

client = FishAudio() # reads FISH_API_KEY
audio = client.tts.convert(text="Hello from Fish Audio!")
audio = client.tts.convert(text="Hello from Fish Audio!", model="s3-pro")
save(audio, "out.mp3")
```

Expand All @@ -67,9 +67,10 @@

const client = new FishAudioClient({ apiKey: process.env.FISH_API_KEY });

const stream = await client.textToSpeech.convert({
text: "Hello from Fish Audio!",
});
const stream = await client.textToSpeech.convert(
{ text: "Hello from Fish Audio!" },
"s3-pro"
);

const chunks = [];
for await (const chunk of stream) chunks.push(Buffer.from(chunk));
Expand All @@ -86,6 +87,7 @@
audio = client.tts.convert(
text="This uses a specific voice.",
reference_id="9a9cf47702da476aa4629e2506d4a857",
model="s3-pro",
)
```

Expand All @@ -107,7 +109,7 @@

### Models

- **`s3-pro`**: the recommended model. Tied for #1 overall on the Artificial Analysis Speech Arena, #1 on Artificial Analysis Pronunciation Robustness, and 100% accuracy on the Cekura TTS benchmark, with lower latency than S2.1-Pro. TTFA, DPA, and ZDR guarantees are available under an enterprise agreement. It has the same `[bracket]` natural-language control and multi-speaker dialogue as the S2 models, plus paired scoped tags such as `<whisper>…</whisper>`, as in Drama 3. See [S3 Pro benchmarks](/developer-guide/models-pricing/models/s3-pro#benchmarks).

Check warning on line 112 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Cekura'?
- **`s2.1-pro`**: improved quality, latency, and throughput over S2-Pro, with TTFA and DPA guarantees available under an enterprise agreement.
- **`drama-3`**: model you direct in plain language, with sounds, pauses, and paired scoped tags for specific words, such as `<whisper>…</whisper>`. See [Drama 3](/features/text-to-speech/drama-3).
- **`s2-pro`**: previous-generation S2 model with multi-speaker and natural-language expression control.
Expand All @@ -126,6 +128,7 @@
audio = client.tts.convert(
text="High quality",
config=TTSConfig(format="wav", sample_rate=44100),
model="s3-pro",
)
```

Expand All @@ -145,7 +148,7 @@

<CodeGroup>
```python Python
audio = client.tts.convert(text="Speaking faster.", speed=1.5)
audio = client.tts.convert(text="Speaking faster.", speed=1.5, model="s3-pro")
```

```bash API (curl)
Expand Down Expand Up @@ -245,16 +248,16 @@

To reuse a voice across many requests, [clone it once](/features/voice-cloning) and pass the resulting `reference_id` instead.

### Format & bitrate

Check warning on line 251 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'bitrate'?

Pick a format for your delivery channel, and tune bitrate to trade size against quality:

Check warning on line 253 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'bitrate'?

| Format | Notes |
|---|---|
| `mp3` (default) | good size/quality balance; set `mp3_bitrate` to `64`, `128`, or `192` |
| `wav` | uncompressed, highest quality; set `sample_rate` (e.g. `44100`) |
| `pcm` | raw samples, no container; for low-latency playback and telephony pipelines |
| `opus` | efficient for streaming; bitrate is automatic (`opus_bitrate=-1000`) |

Check warning on line 260 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'bitrate'?

```python
from fishaudio.types import TTSConfig
Expand All @@ -269,10 +272,10 @@

`latency` trades stability for speed; `chunk_length` controls how much text the engine batches before it starts generating.

- `latency="balanced"` (default): lower time-to-first-audio (~300ms). Good for interactive use.
- `latency="balanced"` (default): lower time-to-first-audio. Good for interactive use. For the measured time to first audio on `s3-pro` with `balanced` and `low`, see [S3 Pro benchmarks](/developer-guide/models-pricing/models/s3-pro#benchmarks).
- `latency="normal"`: most stable output, at slightly higher latency.
- `latency="low"`: lowest latency. Send it in the API request body, or with the JavaScript SDK. The Python SDK's `TTSConfig` accepts `balanced` and `normal`.
- `chunk_length` (`100`–`300`, default `200`): smaller chunks start audio sooner; larger chunks are more efficient for long text. On `s3-pro`, chunking is managed automatically by the service.
- `chunk_length` (`100`–`300`): smaller chunks start audio sooner; larger chunks are more efficient for long text. The API default is `300`; the Python SDK's `TTSConfig` sends `200` unless you set it. On `s3-pro`, chunking is managed automatically by the service.

<CodeGroup>
```python Python
Expand Down Expand Up @@ -361,7 +364,7 @@
```

- **Default**: omit `language`, or send `"auto"` or an empty string, and the language is detected for each text chunk. This is the same behavior as before the field was added.
- **Regional conventions** (`s2.1-pro`, `s2-pro`, `s1`): Spanish without a region follows Spain conventions, so `$300` becomes "trescientos dólares" and decimals use a comma. Send `es-MX` for Mexican readings ("pesos", "punto"). For Traditional Chinese, send `zh-TW`, which uses its own rules. Portuguese follows Brazilian conventions, with or without the `BR` region.

Check warning on line 367 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'trescientos'?

Check warning on line 367 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'punto'?
- **Tags without rules**: a tag with no dedicated normalization rules skips normalization instead of failing. See [Supported normalization languages](#supported-normalization-languages).
- **Mixed-language text**: leave `language` unset.
- **`s3-pro`**: regional tags are normalized with their base language. See [S3 Pro normalization](#s3-pro-normalization).
Expand All @@ -374,9 +377,13 @@

#### S3 Pro normalization

`s3-pro` uses context-aware text normalization: it reads numbers, dates, currencies, units, abbreviations, and symbols the way the surrounding text calls for. It covers 11 languages today, and the list is actively growing: English (`en`), Chinese (`zh`), Japanese (`ja`), Korean (`ko`), Spanish (`es`), French (`fr`), German (`de`), Portuguese (`pt`), Russian (`ru`), Arabic (`ar`), and Hindi (`hi`).
On the hosted API, `s3-pro` uses context-aware text normalization: it reads numbers, dates, currencies, units, abbreviations, and symbols the way the surrounding text calls for. It covers 11 languages today, and the list is actively growing: English (`en`), Chinese (`zh`), Japanese (`ja`), Korean (`ko`), Spanish (`es`), French (`fr`), German (`de`), Portuguese (`pt`), Russian (`ru`), Arabic (`ar`), and Hindi (`hi`).

- It rewrites dates, times, numbers and ordinals, currency amounts, units and percentages, ranges and scores, fractions and math, phone numbers and other digit strings, codes and version numbers, URLs and email addresses, abbreviations and acronyms, Roman numerals, and symbols. The rest of the text is kept as written.
- `[bracket]` directions, speaker tags such as `<|speaker:0|>`, and phoneme markers are kept as written. So are scoped tags such as `<whisper>` and `</whisper>`, but the words between them are still normalized.
- `normalize: false` turns it off.
- Regional tags work: `es-MX` is normalized as Spanish and `zh-TW` as Chinese.
- Without `language`, the language is identified from the text. Text with kana is normalized as Japanese, text with Chinese characters and no kana as Chinese, and text in Hangul as Korean. Japanese written only in kanji, with no kana, is therefore normalized as Chinese: send `language: "ja"` for Japanese text.
- Text in any other language is read by S3 Pro as written, with no error, and no other language's rules are applied to it.

#### Other models
Expand Down Expand Up @@ -404,7 +411,7 @@
| Swedish | `sv`, `sv-SE`, `sv-FI` |
| Malay | `ms`, `ms-MY` |

Each row has its own rules, so the tag you pick changes the readings. For example, with `es` or `es-ES`, `$300` is read as "trescientos dólares" and the `0.9` in `0.9%` as "cero coma nueve". With `es-MX`, they are read as "trescientos pesos" and "cero punto nueve". In the same way, `zh-TW` uses Traditional Chinese rules, not the Simplified Chinese ones.

Check warning on line 414 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'trescientos'?

Check warning on line 414 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'nueve'?

Check warning on line 414 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'trescientos'?

Check warning on line 414 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'punto'?

Check warning on line 414 in features/text-to-speech.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'nueve'?

- Any other tag skips normalization, with no error, and the text is still synthesized as written. Today that includes `zh-HK`, `yue`, `pt-PT`, `es-419`, `es-US`, and `id`.
- With `language` unset, the language of each chunk is auto-detected among the languages in this table. Chinese written mostly in Traditional characters uses the Traditional Chinese rules. Portuguese, Turkish, Tagalog, and Malay are detected only when the detection is confident, so set `language` for short texts in these languages. Malay is close to Indonesian, so many longer Malay sentences are missed as well, and a missed sentence can have its numbers read with another language's rules; for text entirely in Malay, set `language` to `ms` regardless of length. Chunks whose language can't be detected are synthesized without normalization.
Expand Down
4 changes: 2 additions & 2 deletions features/text-to-speech/realtime.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ from fishaudio import FishAudio
client = FishAudio() # reads FISH_API_KEY

with open("out.mp3", "wb") as f:
for chunk in client.tts.stream(text="Streaming keeps latency low."):
for chunk in client.tts.stream(text="Streaming keeps latency low.", model="s3-pro"):
f.write(chunk) # or send to a speaker / socket as it arrives

# Or collect the whole stream into one bytes object:
audio = client.tts.stream(text="Streaming keeps latency low.").collect()
audio = client.tts.stream(text="Streaming keeps latency low.", model="s3-pro").collect()
```

```bash API (curl)
Expand Down
Loading