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
55 changes: 35 additions & 20 deletions .mintlify/skills/fish-audio-api/SKILL.md

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions .mintlify/skills/fish-audio-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

- **Auth:** both SDKs read the API key from the `FISH_API_KEY` environment variable automatically. Get keys at `https://fish.audio/app/api-keys`. Never hardcode a key.
- **Base URL:** `https://api.fish.audio` (override with `base_url=` in Python / `baseUrl:` in JS).
- **TTS models:** the API supports `s1` (deprecated), `s2-pro`, `s2.1-pro`, `drama-3`, and `s3-pro` (recommended). Pass `s3-pro` explicitly: the current SDK releases default to `s2.1-pro`. Do not choose `s1` for new code: S1 is deprecated and will be retired on December 31, 2026. After that date, requests that specify `s1` are served by `s2.1-pro` (migration: `https://docs.fish.audio/developer-guide/models-pricing/migrate-from-s1`). The Python SDK (`fish-audio-sdk` 1.4.0 and later) defaults to `s2.1-pro`; its `Model` type names `s1`, `s2-pro`, `s2.1-pro`, `s2.1-pro-free` and `drama-3` and accepts any other string, so no `# type: ignore` is needed (1.3.0 and earlier defaulted to `s2-pro` and typed only `s1` / `s2-pro`). The JS SDK (`fish-audio` 0.2.0) defaults to `"s2.1-pro"`, and its `Backends` type names `s2.1-pro`, `s2.1-pro-free`, `drama-3`, `s2-pro`, `s1` and accepts any other string, so no cast is needed. `fish-audio` 0.1.0 defaulted to the deprecated `"s1"`; if a project is on 0.1.0, upgrade it or pass the model explicitly. `speech-1.5` / `speech-1.6` are **deprecated**. In Python pass `model="s2.1-pro"` (keyword); in JS pass the **positional** `backend` argument.
- **ASR models:** use `transcribe-1-pro` (recommended: speaker turns, long recordings, emotion cues). It is selected by the `model` HTTP header: in JS pass `model: "transcribe-1-pro"` in the `convert()` request (`fish-audio` 0.2.0+), in Python send the header with `RequestOptions(additional_headers=...)`. A request without it is served and billed as `transcribe-1`, the model for short recordings. See [references/speech-to-text.md](references/speech-to-text.md).
- **TTS models:** the API supports `s1` (deprecated), `s2-pro`, `s2.1-pro`, `drama-3`, and `s3-pro` (recommended). Pass `s3-pro` explicitly: the current SDK releases default to `s2.1-pro`. Do not choose `s1` for new code: S1 is deprecated and will be retired on December 31, 2026. After that date, requests that specify `s1` are served by `s3-pro` (migration: `https://docs.fish.audio/developer-guide/models-pricing/migrate-from-s1`). The Python SDK (`fish-audio-sdk` 1.4.0 and later) defaults to `s2.1-pro`; its `Model` type names `s1`, `s2-pro`, `s2.1-pro`, `s2.1-pro-free` and `drama-3` and accepts any other string, so no `# type: ignore` is needed (1.3.0 and earlier defaulted to `s2-pro` and typed only `s1` / `s2-pro`). The JS SDK (`fish-audio` 0.2.0) defaults to `"s2.1-pro"`, and its `Backends` type names `s2.1-pro`, `s2.1-pro-free`, `drama-3`, `s2-pro`, `s1` and accepts any other string, so no cast is needed. `fish-audio` 0.1.0 defaulted to the deprecated `"s1"`; if a project is on 0.1.0, upgrade it or pass the model explicitly. `speech-1.5` / `speech-1.6` are **deprecated**. In Python pass `model="s3-pro"` (keyword); in JS pass `"s3-pro"` as the **positional** `backend` argument.
- **ASR models:** use `transcribe-2-pro` (recommended: speaker turns, long recordings, emotion cues, plus key terms and written or spoken numbers through the API); `transcribe-1-pro` is the previous Pro model. The model is selected by the `model` HTTP header: in JS pass `model: "transcribe-2-pro"` in the `convert()` request (`fish-audio` 0.2.0+), in Python send the header with `RequestOptions(additional_headers=...)`. A request without it is served and billed as `transcribe-1`, the model for short recordings. See [references/speech-to-text.md](references/speech-to-text.md).
- **`transcribe-2-pro`:** another ASR model, selected the same way as `transcribe-1-pro` with the header value `transcribe-2-pro`. It returns the same response format; its `text_format`, `verbatim`, and `keyterms` fields need raw HTTP (see the `fish-audio-api` skill).
- **Audio formats:** `mp3` (default), `wav`, `pcm`, `opus`.
- **Playback in examples:** `play()` shells out to a system audio tool: Python uses **ffmpeg/ffplay** (or `mpv`), JS uses **ffplay**. It is for local/desktop use; in a server, `save()` to a file or stream the bytes instead. See [references/installation.md](references/installation.md).

Check warning on line 25 in .mintlify/skills/fish-audio-sdk/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'ffplay'?

## Quick start: Python

Expand All @@ -32,7 +33,7 @@
client = FishAudio() # reads FISH_API_KEY

# Generate speech (returns the full audio as bytes)
audio = client.tts.convert(text="Hello from Fish Audio!")
audio = client.tts.convert(text="Hello from Fish Audio!", model="s3-pro")

save(audio, "output.mp3") # write to a file
# play(audio) # or play locally (needs ffmpeg)
Expand All @@ -47,7 +48,7 @@

async def main():
async with AsyncFishAudio() as client:
audio = await client.tts.convert(text="Hello from Fish Audio!")
audio = await client.tts.convert(text="Hello from Fish Audio!", model="s3-pro")
save(audio, "output.mp3")

asyncio.run(main())
Expand All @@ -61,9 +62,10 @@
const client = new FishAudioClient({ apiKey: process.env.FISH_API_KEY });

// convert() returns audio you can play or pipe to a file
const audio = await client.textToSpeech.convert({
text: "Hello from Fish Audio!",
}); // defaults to "s2.1-pro" (fish-audio 0.2.0+)
const audio = await client.textToSpeech.convert(
{ text: "Hello from Fish Audio!" },
"s3-pro", // the model is the positional backend argument
);
await play(audio); // local playback (needs ffplay)
```

Expand All @@ -80,7 +82,7 @@

| Task | Reference |
| ------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Install, auth, playback deps, verify a key | [references/installation.md](references/installation.md) |

Check warning on line 85 in .mintlify/skills/fish-audio-sdk/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'deps'?
| Text-to-Speech (convert, stream, formats, prosody, model select) | [references/text-to-speech.md](references/text-to-speech.md) |
| Voice cloning (instant references + persistent voice models) | [references/voice-cloning.md](references/voice-cloning.md) |
| Speech-to-Text (models, timestamps, response fields by SDK version, realtime in JS) | [references/speech-to-text.md](references/speech-to-text.md) |
Expand All @@ -106,7 +108,7 @@
| Update / delete voice | `client.voices.update(id, ...)` / `delete(id)` | `client.voices.update(id, ...)` / `delete(id)` |
| Credit balance | `client.account.get_credits()` | `client.user.get_api_credit()` |
| Subscription package | `client.account.get_package()` | `client.user.get_package()` |
| Choose model | `model="s3-pro"` keyword arg | positional `backend` arg, e.g. `convert(req, "s3-pro")` |

Check warning on line 111 in .mintlify/skills/fish-audio-sdk/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'arg'?

Check warning on line 111 in .mintlify/skills/fish-audio-sdk/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'arg'?
| ASR model (header) | `RequestOptions(additional_headers=...)` | `convert({ audio, model: "transcribe-1-pro" })` |

## Decision shortcuts
Expand All @@ -117,7 +119,7 @@
- **Clone a voice instantly from a clip** → pass `references=[ReferenceAudio(audio=..., text=...)]` (Python) / `references: [{ audio, text }]` (JS). See [voice-cloning](references/voice-cloning.md).
- **Persistent custom voice to reuse** → create a voice model, then use its `id` as `reference_id`.
- **Stream tokens from an LLM and play speech as it arrives** → `tts.stream_websocket` (Python) / `textToSpeech.convertRealtime` (JS). See [websocket](references/websocket.md).
- **Transcribe audio** → `asr.transcribe` (Python) / `speechToText.convert` (JS) with `transcribe-1-pro` selected (recommended; without it, the request runs on `transcribe-1`). Pro request fields, `speaker_turns`, `request_id`, and the language fields need raw HTTP in Python (`fish-audio-sdk` 1.3.0). See [speech-to-text](references/speech-to-text.md).
- **Transcribe audio** → `asr.transcribe` (Python) / `speechToText.convert` (JS) with `transcribe-2-pro` selected (recommended; without it, the request runs on `transcribe-1`). Pro request fields, `speaker_turns`, `request_id`, and the language fields need raw HTTP in Python (`fish-audio-sdk` 1.3.0). See [speech-to-text](references/speech-to-text.md).
- **Transcribe live audio turn by turn** → `speechToText.convertRealtime` (JS, Node.js only); see the realtime section of the speech-to-text reference.

## Gotchas (verified against the SDK source)
Expand Down
2 changes: 1 addition & 1 deletion .mintlify/skills/fish-audio-sdk/references/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
| Exception | When | Attributes |
| --------------------- | ---------------------------------------------- | --------------------------------- |
| `APIError` | base for HTTP errors | `.status`, `.message`, `.body` |
| `AuthenticationError` | 401 (bad/missing key) | (APIError) |

Check warning on line 12 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'APIError'?
| `PermissionError` | 403 | (APIError) |

Check warning on line 13 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'APIError'?
| `NotFoundError` | 404 (voice id not found) | (APIError) |

Check warning on line 14 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'APIError'?
| `RateLimitError` | 429 | (APIError) |

Check warning on line 15 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'APIError'?
| `ServerError` | 5xx | (APIError) |

Check warning on line 16 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'APIError'?
| `WebSocketError` | realtime stream failed | — |
| `DependencyError` | missing system tool (e.g. ffmpeg for `play()`) | `.dependency`, `.install_command` |

Check warning on line 18 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'ffmpeg'?

```python
from fishaudio import FishAudio
Expand Down Expand Up @@ -116,7 +116,7 @@
- Tune per call via `requestOptions` (the trailing argument on every HTTP method; `speechToText.convertRealtime` takes only `abortSignal` and `timeoutInSeconds`, and `textToSpeech.convertRealtime` takes none):

```ts
const audio = await client.textToSpeech.convert({ text: "Hello!" }, "s2-pro", {
const audio = await client.textToSpeech.convert({ text: "Hello!" }, "s3-pro", {
maxRetries: 5,
timeoutInSeconds: 30,
abortSignal: controller.signal,
Expand All @@ -128,7 +128,7 @@

## Inspecting raw responses (JS)

Every HTTP method returns an awaitable that also exposes the raw response (the realtime WebSocket methods do not):

Check warning on line 131 in .mintlify/skills/fish-audio-sdk/references/errors.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'awaitable'?

```ts
const { data, rawResponse } = await client.textToSpeech
Expand Down
23 changes: 12 additions & 11 deletions .mintlify/skills/fish-audio-sdk/references/speech-to-text.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Speech-to-Text (ASR)

Both SDKs wrap `POST /v1/asr`: one audio file per request, and the response arrives when the whole file has been transcribed. Use `transcribe-1-pro`, the recommended model, selected by the `model` HTTP header on every request. The JS SDK (`fish-audio` 0.2.0+) also streams live audio to `transcribe-stream-1`; see [JavaScript realtime](#javascript-realtime-speechtotextconvertrealtime). Full guide: `https://docs.fish.audio/features/speech-to-text`.
Both SDKs wrap `POST /v1/asr`: one audio file per request, and the response arrives when the whole file has been transcribed. Use `transcribe-2-pro`, the recommended model, selected by the `model` HTTP header on every request. The JS SDK (`fish-audio` 0.2.0+) also streams live audio to `transcribe-stream-1`; see [JavaScript realtime](#javascript-realtime-speechtotextconvertrealtime). Full guide: `https://docs.fish.audio/features/speech-to-text`.

## Choose a model

- `transcribe-1-pro` (recommended): recordings up to 60 minutes, including multi-speaker conversations. `text` contains inline `<|speaker:N|>` markers and bracketed emotion or vocal-event cues such as `[laughter]` or `[高兴]`, and the API returns structured `speaker_turns` when you request timestamps.
- `transcribe-1-pro`: the previous Pro model. Recordings up to 60 minutes, including multi-speaker conversations. `text` contains inline `<|speaker:N|>` markers and bracketed emotion or vocal-event cues such as `[laughter]` or `[高兴]`, and the API returns structured `speaker_turns` when you request timestamps.
- `transcribe-2-pro` (recommended): the same kinds of recordings and the same response format as `transcribe-1-pro`, plus the request fields `text_format` (written or spoken numbers), `verbatim`, and `keyterms`, and the `language` hint is passed to the model. Neither SDK can send those three fields; call the API directly (see the `fish-audio-api` skill).
- `transcribe-1`: general transcription of short recordings. It serves every request whose `model` header is missing or not an exact match.

Select `transcribe-1-pro` with the `model` header:
Select `transcribe-1-pro` with the `model` header (select `transcribe-2-pro` the same way):

- Python: `request_options=RequestOptions(additional_headers={"model": "transcribe-1-pro"})`, with `from fishaudio.core import RequestOptions`.
- JavaScript: pass `model: "transcribe-1-pro"` in the `convert` request (`fish-audio` 0.2.0+; on 0.1.0, pass `{ headers: { model: "transcribe-1-pro" } }` as the second argument).
- Write the value exactly, in lowercase. A missing or unrecognized value (for example `Transcribe-1-Pro` or `transcribe-1pro`) is served and billed as `transcribe-1`, and no error is returned. If you expected `transcribe-1-pro` but the transcript has no speaker markers and you did not send `diarize=false`, check the header.
- Write the value exactly, in lowercase. A missing or unrecognized value (for example `Transcribe-1-Pro`, `transcribe-1pro`, or `transcribe-2`) is served and billed as `transcribe-1`, and no error is returned. If you expected a Pro model but the transcript has no speaker markers and you did not send `diarize=false`, check the header.

## Python: `client.asr.transcribe`

Expand Down Expand Up @@ -39,12 +40,12 @@

Keyword params:

| Param | Type | Default | Notes |
| -------------------- | ------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | `bytes` | — (required) | Raw file bytes; the format is detected from the content. The SDK sends them as MessagePack. |
| `language` | `str` | auto-detect | Optional hint, a lowercase ISO 639-1 code (`"en"`, `"zh"`, `"ja"`). Detection still runs, and the hint does not force the transcript language. `"en-US"` or `"English"` may be rejected with 400. |
| `include_timestamps` | `bool` | `True` | `True` (default) requests word-level timestamps, which adds processing time; pass `False` when you only need text (`segments` is then empty). |
| `request_options` | `RequestOptions \| None` | `None` | Per-request `timeout` and headers. Select the model here: `RequestOptions(additional_headers={"model": "transcribe-1-pro"})`. |
| Param | Type | Default | Notes |
| -------------------- | ------------------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio` | `bytes` | — (required) | Raw file bytes; the format is detected from the content. The SDK sends them as MessagePack. |
| `language` | `str` | auto-detect | Optional hint, a lowercase ISO 639-1 code (`"en"`, `"zh"`, `"ja"`). Detection still runs, and the hint does not force the transcript language. |
| `include_timestamps` | `bool` | `True` | `True` (default) requests word-level timestamps, which adds processing time; pass `False` when you only need text (`segments` is then empty). |
| `request_options` | `RequestOptions \| None` | `None` | Per-request `timeout` and headers. Select the model here: `RequestOptions(additional_headers={"model": "transcribe-1-pro"})`. |

### Response shape (`ASRResponse`)

Expand All @@ -70,7 +71,7 @@
- `request_id` (`transcribe-1-pro`), also sent as the `x-request-id` header;
- `language` (English name, such as `English`) and `language_code` (ISO 639-1, such as `en`), returned when the language is known.

`asr.transcribe()` cannot send the `transcribe-1-pro` fields `tag_audio_events`, `diarize`, `num_speakers`, `min_speakers`, or `max_speakers`. For any of these, call the API directly. Field semantics are in the `fish-audio-api` skill (`POST /v1/asr`).
`asr.transcribe()` cannot send the Pro model fields `tag_audio_events`, `diarize`, `num_speakers`, `min_speakers`, or `max_speakers`, or the `transcribe-2-pro` fields `text_format`, `verbatim`, or `keyterms`. For any of these, call the API directly. Field semantics are in the `fish-audio-api` skill (`POST /v1/asr`).

```python
import os
Expand Down Expand Up @@ -183,7 +184,7 @@

## JavaScript realtime: `speechToText.convertRealtime`

`client.speechToText.convertRealtime(request, audioStream, requestOptions?)` (`fish-audio` 0.2.0+, **Node.js only**) streams live 16-bit little-endian mono PCM to `transcribe-stream-1` over a WebSocket and returns a `RealtimeSTTStream` **synchronously** (no `await`). Iterate it with `for await`; events are narrowed by `type`, and their fields are the protocol's snake_case names. Guide: `https://docs.fish.audio/features/speech-to-text/realtime`.

Check warning on line 187 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

'snake_case' looks like code; format it as code.

```ts
import { createReadStream } from "node:fs";
Expand Down Expand Up @@ -219,5 +220,5 @@

- `transcribe-1-pro` accepts recordings up to 60 minutes (longer returns 400 `audio_too_long`). Send long recordings as compressed audio (MP3, Opus, or AAC); a request that is too large returns 413. Send a whole conversation as one file: speaker labels are consistent within one response, not across requests.
- Processing time grows with the length of the recording, and long `transcribe-1-pro` requests can take several minutes. Raise the SDK timeout for long recordings (the examples use 900 s; the defaults are in [errors](errors.md)), and in Node.js also raise the `fetch` header limit shown above.
- `transcribe-1-pro` accepts WAV, MP3, AAC (including M4A/MP4), FLAC, Ogg (Opus or Vorbis), WebM/Matroska, and MOV, including browser recordings, and uses the first audio track of a video file. AIFF, CAF, WMA, AMR, AC-3, and raw (headerless) PCM return 400.

Check warning on line 223 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Ogg'?

Check warning on line 223 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Vorbis'?

Check warning on line 223 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'headerless'?
- If you use `transcribe-1`: it is designed for short recordings, up to 50 MiB per request; keep MP3 and Opus files under 25 MiB. For recordings longer than a few minutes, use `transcribe-1-pro`. It accepts WAV, MP3, AAC (including M4A/MP4), FLAC, and Ogg (Opus or Vorbis); convert browser WebM recordings to Ogg/Opus, MP3, or WAV first, or use `transcribe-1-pro`.

Check warning on line 224 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Ogg'?

Check warning on line 224 in .mintlify/skills/fish-audio-sdk/references/speech-to-text.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'Vorbis'?
4 changes: 2 additions & 2 deletions .mintlify/skills/fish-audio-sdk/references/text-to-speech.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
| `latency` | `"normal" \| "balanced"` | `"balanced"` | `normal` = higher quality, `balanced` = faster. (No `"low"`.) |
| `speed` | `float` | — | Shortcut for prosody speed (0.5–2.0). |
| `config` | `TTSConfig` | `TTSConfig()` | Reusable bundle of the settings below. |
| `model` | `"s2.1-pro" \| "s2.1-pro-free" \| "s2-pro" \| "drama-3" \| "s1"` or any `str` | `"s2.1-pro"` | Synthesis model (`fish-audio-sdk` 1.4.0 and later; 1.3.0 and earlier defaulted to `"s2-pro"`). `s1` is deprecated and will be retired on December 31, 2026; after that date, requests that specify `s1` are served by `s2.1-pro`. `speech-1.5` / `speech-1.6` are deprecated. |
| `model` | `"s2.1-pro" \| "s2.1-pro-free" \| "s2-pro" \| "drama-3" \| "s1"` or any `str` | `"s2.1-pro"` | Synthesis model (`fish-audio-sdk` 1.4.0 and later; 1.3.0 and earlier defaulted to `"s2-pro"`). `s1` is deprecated and will be retired on December 31, 2026; after that date, requests that specify `s1` are served by `s3-pro`. `speech-1.5` / `speech-1.6` are deprecated. |
| `request_options` | `RequestOptions \| None` | `None` | Per-request timeout / headers; see [errors.md](errors.md). |

Direct params (`reference_id`, `format`, `latency`, `speed`) override the matching field on `config` when set.
Expand All @@ -61,7 +61,7 @@
audio2 = client.tts.convert(text="Second line.", config=config)
```

`TTSConfig` fields (with defaults): `format="mp3"`, `sample_rate=None`, `mp3_bitrate=128` (`64|128|192`), `opus_bitrate=32` (kbps: `-1000|24|32|48|64`, `-1000`=auto), `normalize=True`, `chunk_length=200`, `latency="balanced"`, `reference_id=None`, `references=[]`, `prosody=None`, `top_p=0.7`, `temperature=0.7`, `max_new_tokens=1024`, `repetition_penalty=1.2`, `min_chunk_length=50`, `condition_on_previous_chunks=True`, `early_stop_threshold=1.0`.

Check warning on line 64 in .mintlify/skills/fish-audio-sdk/references/text-to-speech.md

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

Vale.Spelling

Did you really mean 'kbps'?

### Streaming the HTTP response

Expand Down Expand Up @@ -136,5 +136,5 @@

## Model & expression notes

- `s3-pro` is the recommended model; pass it explicitly. `s2.1-pro` is the Python SDK default (`fish-audio-sdk` 1.4.0 and later). `s1` is the previous generation: S1 is deprecated and will be retired on December 31, 2026. After that date, requests that specify `s1` are served by `s2.1-pro`. Migration: `https://docs.fish.audio/developer-guide/models-pricing/migrate-from-s1`.
- `s3-pro` is the recommended model; pass it explicitly. `s2.1-pro` is the Python SDK default (`fish-audio-sdk` 1.4.0 and later). `s1` is the previous generation: S1 is deprecated and will be retired on December 31, 2026. After that date, requests that specify `s1` are served by `s3-pro`. Migration: `https://docs.fish.audio/developer-guide/models-pricing/migrate-from-s1`.
- Emotion/expression is controlled inline in `text` (S2-Pro uses free-form `[bracket]` tags; the deprecated S1 uses legacy `(parenthesis)` tags, and the API does not convert between them); there is no separate SDK parameter. Full tag list: `https://docs.fish.audio/api-reference/emotion-reference`.
2 changes: 1 addition & 1 deletion .mintlify/skills/fish-audio-sdk/references/websocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function* textStream() {
const connection = await client.textToSpeech.convertRealtime(
{ text: "", reference_id: "<voice-id>" },
textStream()
// optional positional backend, e.g. "s2-pro"
// optional positional backend, e.g. "s3-pro"
);

const chunks: Buffer[] = [];
Expand Down
15 changes: 15 additions & 0 deletions api-reference/asyncapi-asr-realtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ components:
$ref: "#/components/schemas/AsrResults"
context:
$ref: "#/components/schemas/AsrContext"
language_hints:
type: array
items:
type: string
description: |
`transcribe-stream-2` only. The languages you expect in the
session, as language codes such as `en`, so accented speech is
transcribed in the right language.
client_reference_id:
type: string
maxLength: 256
Expand Down Expand Up @@ -1197,6 +1205,13 @@ components:
and symbols). `null` is the same as leaving it out.
`transcribe-stream-1` refuses this field, whatever its value,
`null` included, with `invalid_config`.
primary_speaker:
type: boolean
default: false
description: |
`transcribe-stream-2` only. `true` transcribes the person
speaking to your agent and leaves out other voices in the
background.
vad_events:
type: boolean
default: false
Expand Down
Loading
Loading