Repository navigation
docs(realtime-stt): document transcribe-stream-2 and results.text_format - #403
Draft
liujiahua123123 wants to merge 4 commits into
Draft
liujiahua123123 wants to merge 4 commits into
liujiahua123123 wants to merge 4 commits into
Conversation
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.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Do not merge before
transcribe-stream-2is live onwss://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 aftertranscribe-stream-2is 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-2is a second realtime speech-to-text model on the same WebSocket endpoint. The client picks it with themodelhandshake header, as the docs already describe fortranscribe-stream-1. Both models speak the same protocol; the one addition isresults.text_format, which onlytranscribe-stream-2takes.transcribe-stream-1stays the default model: a connection without amodelheader gets it, as today, and the pages say so.api-reference/endpoint/websocket/asr-realtime.mdx: themodelheader row lists both models; a new Models subsection under Connect (prices,transcribe-stream-1stays the default, an exact header value is needed, any other value or no header gets atranscribe-stream-1session billed as such,session_started.config.modelnames the session's model);results.text_formatin theconfigtable and the wrong-value rule (nullcounts as not sent, so it is not a wrong value); theconfigureparagraph saysturn_detection,resultsandcontexttake the same values as inconfig, exceptresults.text_format, which is set inconfigfor the whole session;config.modelin thesession_startedtable; a new Text format section (spoken/written with examples, chosen inconfigfor the whole session, applies to drafts,eager_end_of_turnandcommitted, echo,null, the invalid-value message, howtranscribe-stream-1refuses it inconfig, described by error type and close code without quoting its message). The pages say nothing abouttext_formatinconfigurebeyond that exception, for either model: no sentence singles outtranscribe-stream-1refusing it there, because read together such sentences implied thattranscribe-stream-2accepts it. Neither value is recommended.api-reference/asyncapi-asr-realtime.yml:transcribe-stream-2in themodelheader enum and the connection headers;text_formatinAsrResults(defaultspoken;nullallowed, as the reference page says);config.modelmentioned onsession_started.AsrResultsUpdate(configure) does not listtext_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 sendmodel: transcribe-stream-2; a Numbers and times note under Implementation details (set inconfig, 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 withtranscribe-stream-1(they were; nothing is claimed fortranscribe-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
transcribe-stream-2(open; decide before merge). The pages say that a connection without themodelheader, or with another value, getstranscribe-stream-1. They say nothing about a connection that namestranscribe-stream-2while that model is unavailable. Not decided: is such a connection refused, or can it be served bytranscribe-stream-1, attranscribe-stream-1's price? If that fallback is accepted, one sentence will be added to both Models sections telling clients to checksession_started.config.model(a client that sendsresults.text_formatwould getinvalid_configand close 4400 in that case). If it is refused, the pages will name the error it gets.text_formatduring a session (open). The pages documenttext_formatinconfigonly, chosen for the whole session, and theconfigureparagraph names it as the exception to "the same values as inconfig". They neither offer changing it withconfigurenor say the server refuses it there, and the AsyncAPIconfigureschema does not list it. A change oftext_formatin 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 theconfigureparagraph and add it to theconfiguretiming rule, the Text format section andAsrResultsUpdate."spoken"and"written"and recommend neither. Decide whether to recommend one.transcribe-stream-1keeps its Preview label and the "is in preview" notes.transcribe-stream-2has no label either way. Decide whether it is Preview.modelheader 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 reachtranscribe-stream-1: they are covered by "any other value". Say so if the alias should be named again.developer-guide/models-pricing/models-overview.mdxshould listtranscribe-stream-2in its Speech-to-Text Models table. I left the page alone because thetranscribe-1-prorow 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.text_formatdocs yet. Notext_formatdocs for the batch API are onmainor 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.language_codevalues) comes from the server's per-message language detection, which is the same for both models, so it is unchanged. Iftranscribe-stream-2should advertise a different set of transcription languages, that is a separate decision and change.realtime-transcription,realtime-voice-agent) send nomodelheader, so they still run, correctly, ontranscribe-stream-1. docs(stt): use the Python SDK for realtime speech to text and model selection #402 rewrites them for the Python SDK; whether the SDK's realtime call can send amodelheader andtext_formatis a question for that PR. docs(stt): use the Python SDK for realtime speech to text and model selection #402 also editsfeatures/speech-to-text/realtime.mdx, in different hunks.openapi.json:transcribe-stream-2is not an Agents speech-recognition option.mainnow has a changelog entry for each model release,transcribe-stream-1included (October 20, 2026, added in docs(changelog): add October–November 2026 product and model releases #404).transcribe-stream-2should 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.mdxNot verified
transcribe-stream-2is 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 addresults.text_formatand 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 andnull.transcribe-stream-1's refusal oftext_formatinconfigis documented by its effect only (invalid_config, close 4400, amessagethat 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 nameresults.text_formatin it. Inconfigureit answersconfiguredwithok: false; the pages leave that to the general rule for unknown fields inconfigure.model: transcribe-stream-2getssession_started.config.model: "transcribe-stream-2"andresults.text_format: "spoken"."written"gives digits ("$25", "3:30").configwith"results": {"text_format": 5}getsinvalid_config, close 4400 and the must-be message;nullis accepted and gives"spoken".transcribe-stream-1.transcribe-stream-1with anytext_formatgetsinvalid_configand close 4400.transcribe-stream-2sessions at the new price.Checks
Re-run on the fourth commit (
nullin theconfigwrong-value rule; escaped dollar amounts in the realtime Pricing paragraph; one line each inasr-realtime.mdxandrealtime.mdx):prettier --check(prettier 3.6.2, the repo's version) on the changed.mdx/.ymlfiles: clean, exceptoverview/capabilities.mdx, which already fails onmain. This PR changes one line there.mint broken-links(mint 4.3.88): no findings in the changed files. The 8 existing findings are inapi-reference/sdk/python/overview.mdxandtemp/.mint validate(mint 4.3.88): no findings in the changed files. The 7 existing errors are insnippets/*.jsxandtemp/.@asyncapi/parser3 onapi-reference/asyncapi-asr-realtime.yml: parses with no errors or warnings, as onmain(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 andtranscribe-stream-2as code; before the fourth commit the text between its two dollar signs was read as inline math, and the backticks aroundtranscribe-stream-2showed literally. The anchors#models,#text-formatand#numbers-and-timesexist. The WebSocket reference showsresults.text_formatas a string with the new description.AsrResults.text_formatisspoken,writtenornull, defaultspoken;AsrResultsUpdatehas notext_format.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.