Skip to content

docs(realtime-stt): document transcribe-stream-2 and results.text_format - #403

Draft
liujiahua123123 wants to merge 4 commits into
mainfrom
docs/transcribe-stream-2
Draft

liujiahua123123 wants to merge 4 commits into
mainfrom
docs/transcribe-stream-2

Conversation

@liujiahua123123

@liujiahua123123 liujiahua123123 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Do not merge before transcribe-stream-2 is live on wss://api.fish.audio/v1/asr/realtime, billed at $0.12 per session hour, and verified through that public endpoint (the live checks under "Not verified"). The launch date is to be confirmed; merge only after transcribe-stream-2 is verified on the public endpoint. Open point 1 (failover) must be decided first. If the launch is rolled back after this PR has merged, revert this PR as part of the rollback.

What changes

transcribe-stream-2 is a second realtime speech-to-text model on the same WebSocket endpoint. The client picks it with the model handshake header, as the docs already describe for transcribe-stream-1. Both models speak the same protocol; the one addition is results.text_format, which only transcribe-stream-2 takes. transcribe-stream-1 stays the default model: a connection without a model header gets it, as today, and the pages say so.

  • api-reference/endpoint/websocket/asr-realtime.mdx: the model header row lists both models; a new Models subsection under Connect (prices, transcribe-stream-1 stays the default, an exact header value is needed, any other value or no header gets a transcribe-stream-1 session billed as such, session_started.config.model names the session's model); results.text_format in the config table and the wrong-value rule (null counts as not sent, so it is not a wrong value); the configure paragraph says turn_detection, results and context take the same values as in config, except results.text_format, which is set in config for the whole session; config.model in the session_started table; a new Text format section (spoken/written with examples, chosen in config for the whole session, applies to drafts, eager_end_of_turn and committed, echo, null, the invalid-value message, how transcribe-stream-1 refuses it in config, described by error type and close code without quoting its message). The pages say nothing about text_format in configure beyond that exception, for either model: no sentence singles out transcribe-stream-1 refusing it there, because read together such sentences implied that transcribe-stream-2 accepts it. Neither value is recommended.
  • api-reference/asyncapi-asr-realtime.yml: transcribe-stream-2 in the model header enum and the connection headers; text_format in AsrResults (default spoken; null allowed, as the reference page says); config.model mentioned on session_started. AsrResultsUpdate (configure) does not list text_format (see open point 2); that schema does not forbid other fields, so leaving it out claims no refusal.
  • features/speech-to-text/realtime.mdx: description and intro name both models; a Models section; the quick start's Connect step says to send model: transcribe-stream-2; a Numbers and times note under Implementation details (set in config, for the whole session); both prices (the two dollar amounts in the Pricing paragraph are escaped, because the docs build otherwise reads the text between them as inline math). The latency figures are now labelled as measured with transcribe-stream-1 (they were; nothing is claimed for transcribe-stream-2).
  • developer-guide/models-pricing/pricing-and-rate-limits.mdx: transcribe-stream-2 (Realtime ASR) at $0.12 / session hour; the Realtime ASR billing rules now cover both models, at the price of the session's model; the header rule.
  • overview/capabilities.mdx, llms.txt: name both realtime models.

Open points

  1. Failover for transcribe-stream-2 (open; decide before merge). The pages say that a connection without the model header, or with another value, gets transcribe-stream-1. They say nothing about a connection that names transcribe-stream-2 while that model is unavailable. Not decided: is such a connection refused, or can it be served by transcribe-stream-1, at transcribe-stream-1's price? If that fallback is accepted, one sentence will be added to both Models sections telling clients to check session_started.config.model (a client that sends results.text_format would get invalid_config and close 4400 in that case). If it is refused, the pages will name the error it gets.
  2. Changing text_format during a session (open). The pages document text_format in config only, chosen for the whole session, and the configure paragraph names it as the exception to "the same values as in config". They neither offer changing it with configure nor say the server refuses it there, and the AsyncAPI configure schema does not list it. A change of text_format in the middle of a session has not been evaluated, so the pages do not offer it; whether to offer it later is open. If it is offered, drop the exception from the configure paragraph and add it to the configure timing rule, the Text format section and AsrResultsUpdate.
  3. Recommending a value (open). The pages describe "spoken" and "written" and recommend neither. Decide whether to recommend one.
  4. Preview label. transcribe-stream-1 keeps its Preview label and the "is in preview" notes. transcribe-stream-2 has no label either way. Decide whether it is Preview.
  5. Legacy alias. The model header row on the WebSocket reference and in the AsyncAPI spec used to name the realtime model's legacy alias (its name before the 2026-10-20 rename). Both lines had to be rewritten, and the new text no longer names the alias. Requests that use it still reach transcribe-stream-1: they are covered by "any other value". Say so if the alias should be named again.
  6. Models overview not edited. developer-guide/models-pricing/models-overview.mdx should list transcribe-stream-2 in its Speech-to-Text Models table. I left the page alone because the transcribe-1-pro row has an emotion-cue example in a non-Latin script, and this PR keeps to files without such text. The batch launch will probably rewrite that table; add the realtime row then, or tell me to edit the page here.
  7. No batch text_format docs yet. No text_format docs for the batch API are on main or in an open PR, so the realtime Text format section does not refer to the batch API. When the batch docs land, the two sections can link to each other. State each default explicitly in both.
  8. Languages. The realtime language list (29 language_code values) comes from the server's per-message language detection, which is the same for both models, so it is unchanged. If transcribe-stream-2 should advertise a different set of transcription languages, that is a separate decision and change.
  9. Not touched:
  10. Price rounding. The pages say $0.12 / session hour, as decided. If billing stores a rounded per-second rate, the hourly figure is approximate, as it is for other per-second prices.
  11. Changelog entry at launch (recommended). main now has a changelog entry for each model release, transcribe-stream-1 included (October 20, 2026, added in docs(changelog): add October–November 2026 product and model releases #404). transcribe-stream-2 should get one too, dated the day it goes live. It is not in this PR because the launch date is not confirmed. Add it as the last commit before this PR merges (the merge follows the live verification anyway), or as a small PR on launch day. A proposed entry is below; bring it in line with the open points decided by then (Preview label). Dollar amounts are escaped as in the other changelog entries.
Proposed entry for developer-guide/getting-started/changelog.mdx
<Update label="Realtime Speech to Text (transcribe-stream-2)" description="LAUNCH DATE" tags={["Fish Audio"]}>
  ## Realtime Speech to Text (`transcribe-stream-2`)

  `transcribe-stream-2` is a second realtime speech-to-text model on `wss://api.fish.audio/v1/asr/realtime`, at \$0.12 per session hour. Select it with the `model: transcribe-stream-2` header. It uses the same protocol, turn detection and limits as `transcribe-stream-1`, which stays the default. Set `results.text_format` in `config` to choose the style for numbers, amounts and times: `"spoken"` (words, the default) or `"written"` (digits and symbols).

  [Realtime Speech to Text](/features/speech-to-text/realtime#models) | [WebSocket reference](/api-reference/endpoint/websocket/asr-realtime#models)
</Update>

Not verified

  • transcribe-stream-2 is not served on the public endpoint yet, so none of this was tried live. The behaviour comes from the realtime service's protocol notes and code, including the changes that add results.text_format and the second, non-default model route on the same endpoint, which are not released yet. That covers the header routing, session_started.config.model, the validation and the invalid-value message, the echo and null.
  • transcribe-stream-1's refusal of text_format in config is documented by its effect only (invalid_config, close 4400, a message that names the field). Its message text is not quoted because it differs between service releases; the releases in service today and the unreleased change that adds the field all name results.text_format in it. In configure it answers configured with ok: false; the pages leave that to the general rule for unknown fields in configure.
  • Before merging, check with live sessions:
    • model: transcribe-stream-2 gets session_started.config.model: "transcribe-stream-2" and results.text_format: "spoken".
    • "written" gives digits ("$25", "3:30").
    • A config with "results": {"text_format": 5} gets invalid_config, close 4400 and the must-be message; null is accepted and gives "spoken".
    • No header gets transcribe-stream-1.
    • transcribe-stream-1 with any text_format gets invalid_config and close 4400.
    • Billing shows transcribe-stream-2 sessions at the new price.

Checks

Re-run on the fourth commit (null in the config wrong-value rule; escaped dollar amounts in the realtime Pricing paragraph; one line each in asr-realtime.mdx and realtime.mdx):

  • prettier --check (prettier 3.6.2, the repo's version) on the changed .mdx/.yml files: clean, except overview/capabilities.mdx, which already fails on main. This PR changes one line there.
  • mint broken-links (mint 4.3.88): no findings in the changed files. The 8 existing findings are in api-reference/sdk/python/overview.mdx and temp/.
  • mint validate (mint 4.3.88): no findings in the changed files. The 7 existing errors are in snippets/*.jsx and temp/.
  • @asyncapi/parser 3 on api-reference/asyncapi-asr-realtime.yml: parses with no errors or warnings, as on main (second commit; the YAML is unchanged since).
  • mint dev (fourth commit): the four changed pages render (HTTP 200), with no literal backticks in their paragraphs, list items or table cells. The realtime Pricing paragraph shows both prices and transcribe-stream-2 as code; before the fourth commit the text between its two dollar signs was read as inline math, and the backticks around transcribe-stream-2 showed literally. The anchors #models, #text-format and #numbers-and-times exist. The WebSocket reference shows results.text_format as a string with the new description.
  • The AsyncAPI YAML reads back as intended: AsrResults.text_format is spoken, written or null, default spoken; AsrResultsUpdate has no text_format.
  • Not run: the cookbook tests. No code example changed.

Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

transcribe-stream-2 is a second realtime model on wss://api.fish.audio/v1/asr/realtime,
selected with the model handshake header. A connection without the header, or with any
other value, keeps getting transcribe-stream-1. session_started.config.model names the
session's model.

- WebSocket reference and AsyncAPI spec: the model header lists both models; a Models
  table with prices; results.text_format ("spoken" default, "written"), transcribe-stream-2
  only, with its validation, echo, configure timing and how transcribe-stream-1 refuses it.
- Realtime guide: a Models section, the header in the quick start, a Numbers and times
  note, both prices; the latency figures are labelled as transcribe-stream-1's.
- Pricing: transcribe-stream-2 at $0.12 / session hour, Realtime ASR, billed per second.
- Capabilities overview and llms.txt name both realtime models.
@mintlify

mintlify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hanabiaiinc 🟢 Ready View Preview Nov 24, 2026, 3:15 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…ng neutral

- Text format: choose results.text_format in config, for the whole session;
  drop the configure timing rule for it (WebSocket reference, Realtime guide)
  and its entry in the AsyncAPI configure schema, which does not forbid other
  fields.
- Describe both values as styles and recommend neither; drop the "preferred
  style" and "nothing rewrites it" sentence.
- transcribe-stream-1's refusal of text_format is described by error type,
  close code and configured ok: false, without quoting its message, which
  differs between service releases.
- AsyncAPI AsrResults.text_format allows null, as the reference page says.
- configure: turn_detection, results and context take the same values as
  in config, except results.text_format, which is set in config for the
  whole session.
- Drop the sentences that single out transcribe-stream-1 refusing
  text_format in configure (configured reference, Text format section,
  Realtime guide). Read together they implied that transcribe-stream-2
  accepts it there. The generic unknown-field rule for configure still
  applies.
…e realtime prices

The config validation paragraph on the WebSocket reference listed every
text_format other than "spoken" or "written" as invalid_config, which
includes null. null is the same as not sending the field, as the Text
format section and the AsyncAPI spec say, so it is now listed with the
two accepted values.

The realtime page's pricing line had two unescaped dollar amounts in one
paragraph. The docs build read the text between them as inline math, so
the page showed the inline code between them with literal backticks.
Both amounts are now escaped, as on the other pricing pages.

This branch was successfully deployed

1 active deployment
staging — 7525dcad Deployed Nov 24, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant