Repository navigation
docs(realtime-stt): document transcribe-stream-2 and results.text_format - #403
Draft
liujiahua123123 wants to merge 1 commit into
Draft
liujiahua123123 wants to merge 1 commit into
liujiahua123123 wants to merge 1 commit into
Conversation
Contributor
|
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. |
liujiahua123123
force-pushed
the
docs/transcribe-stream-2
branch
from
November 24, 2026 23:43
699444c to
45c845e
Compare
liujiahua123123
force-pushed
the
docs/transcribe-stream-2
branch
from
November 25, 2026 04:51
45c845e to
19fb6c8
Compare
liujiahua123123
force-pushed
the
docs/transcribe-stream-2
branch
from
November 25, 2026 08:14
19fb6c8 to
8349d07
Compare
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, with the same protocol as transcribe-stream-1. transcribe-stream-1 stays the default: a connection without the model header, or with any other value, gets a transcribe-stream-1 session, billed as transcribe-stream-1. - WebSocket reference: the model header row names both models (it no longer names the legacy alias, which "any other value" covers). A new Models subsection gives the prices and the header rule. A connection that names transcribe-stream-2 is meant to be served by it. While that model is temporarily unavailable, the handshake can be refused with a 5xx status (connect again with backoff), or the session can start and its turns can get engine_error, each followed by a degraded committed, and the session continues. session_started.config.model names the model that serves the session, and the session is billed at that model's price. - Handshake refusals: new 502 and 504 rows, and the 503 row reads "restarting or temporarily unavailable". x-request-id is named only on the 101 and the capacity 429; a 502, 503 or 504 refusal can come with or without one. - results.text_format for transcribe-stream-2: "written" (the default) or "spoken", set in config for the whole session; null is the same as leaving it out. A new Text format section, the config table and the wrong-value rule. transcribe-stream-1 refuses a config that sends it with invalid_config and close 4400. The configure paragraph names it as the exception to "the same values as in config". - AsyncAPI: transcribe-stream-2 in the model header enum and the connection headers, text_format in AsrResults, config.model on session_started. - Realtime feature page: both models, a Models section with the same wording on an unavailable transcribe-stream-2, the model header in the quick start, a Numbers and times note, both prices (dollar signs escaped), and the latency figures labelled as measured with transcribe-stream-1. - Pricing: transcribe-stream-2 at $0.12 per session hour; Realtime ASR is billed at the price of the session's model. - Capabilities overview and llms.txt name both realtime models.
liujiahua123123
force-pushed
the
docs/transcribe-stream-2
branch
from
November 25, 2026 08:14
8349d07 to
4c9ad23
Compare
leng-yue
added a commit
that referenced
this pull request
Dec 2, 2026
… model card, and Capabilities transcribe-stream-2 serves the realtime WebSocket alongside transcribe-stream-1, which stays the default; it is selected with `model: transcribe-stream-2` and takes `results.text_format`. The realtime page, its API reference and the pricing row are in #403. Ship this commit with #403, at the transcribe-stream-2 launch; revert it if the docs ship first.
leng-yue
added a commit
that referenced
this pull request
Dec 2, 2026
…cross pages The realtime API reference and AsyncAPI file list transcribe-stream-2 next to the default transcribe-stream-1 (exact header value; anything else gets transcribe-stream-1); the Realtime Speech to Text page has a Models section with results.text_format; the Models Overview card links to that page. Facts from #403. Prices and the full #403 changes stay in #403. Ship with the transcribe-stream-2 launch, together with 9a19c6d.
leng-yue
added a commit
that referenced
this pull request
Dec 2, 2026
…ealtime reference - Pricing & Rate Limits: transcribe-stream-2 at $0.26 / session hour, with a launch price of $0.12 / session hour through December 31, 2026; the model header rule and per-model billing for Realtime ASR. - Realtime API reference and AsyncAPI: results.text_format in the config results (transcribe-stream-2 only, "spoken" or "written", default "written"; transcribe-stream-1 refuses it); configure does not change it. - Realtime Speech to Text: transcribe-stream-1 refuses text_format with invalid_config. Facts from #403 and the STT launch owner. Ship with the transcribe-stream-2 launch.
leng-yue
added a commit
that referenced
this pull request
Dec 2, 2026
… the recommended speech-to-text models - New Transcribe 2 model card (Model Cards group): both models, endpoints, headers, launch and list prices, what transcribe-2-pro adds (language hints, text_format, verbatim, keyterms; 39 recommended languages), and what transcribe-stream-2 offers on the realtime endpoint. - Models Overview: the Choose a Model table, the speech-to-text diagram (transcribe-1-pro -> transcribe-2-pro, transcribe-stream-1 -> transcribe-stream-2) and the cards recommend Transcribe 2. - Transcribe 1 card: points new projects to Transcribe 2. - Pricing: transcribe-2-pro at $0.16 / audio hour, with the $0.06 launch price through December 31, 2026; recommended labels move to Transcribe 2. - Capabilities, Model Deprecations, changelog and llms.txt follow. Facts from #456, #403 and the STT launch owner.
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 until the public endpoint checks under "Before merging" have passed: live sessions through
wss://api.fish.audio/v1/asr/realtime, withmodel: transcribe-stream-2routed to the new model, including billing at $0.12 per session hour. Where that stands:transcribe-stream-2deployment in the region that serves it is installed, and a direct test of it passed (not through the public endpoint; see "Tested so far").model: transcribe-stream-2on the public endpoint. The deploy order puts the failover setup fortranscribe-stream-2in place first, in the other regions that serve this endpoint: a connection that namestranscribe-stream-2there is passed on totranscribe-stream-2when it can take it and refused otherwise, and is not handed totranscribe-stream-1(known gaps aside, see "Decided").The launch date is to be confirmed. 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:modelheader row lists both models.transcribe-stream-1stays the default; the header value must be exact, and any other value or no header gets atranscribe-stream-1session, billed as such. A connection that namestranscribe-stream-2is meant to be served by it. While that model is temporarily unavailable, the handshake can be refused with a 5xx status (connect again with backoff), or the session can start and its turns can geterrorwithengine_error, each followed by a degradedcommitted, and the session continues.session_started.config.modelnames the model that serves the session, and the session is billed at that model's price, so check it.x-request-idsentence names the header only on the 101 and the capacity 429, and says a 502, 503 or 504 refusal can come with or without one.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.configfor the whole session, applies to drafts,eager_end_of_turnandcommitted, echo,null, the invalid-value message, and 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(defaultwritten;nullallowed, as the reference page says);config.modelmentioned onsession_started.AsrResultsUpdate(configure) does not listtext_format(see open point 1); that schema does not forbid other fields, so leaving it out claims no refusal. The spec documents no handshake refusals, so the 5xx refusals are not in it either.features/speech-to-text/realtime.mdx: description and intro name both models; a Models section with the same wording on an unavailabletranscribe-stream-2(a refused handshake with a 5xx status, connect again with backoff; or a session whose turns get an error while the session continues; checksession_started.config.model, which also sets the price); 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.The PR is one commit on
main. Its message describes the pages as they are and makes no promise the pages do not make.Decided
transcribe-stream-2is not replaced bytranscribe-stream-1by design (decided 2026-11-24). When the endpoint fails over, a connection that namestranscribe-stream-2is passed on totranscribe-stream-2when it can take it, and refused otherwise. This is how the deployment is set up, not something the pages can promise without exception, because of the known gaps below. So both Models sections say: a connection that namestranscribe-stream-2is meant to be served bytranscribe-stream-2; while that model is temporarily unavailable, the handshake can be refused with a 5xx status, or the session can start and its turns can get an error;session_started.config.modelnames the model that serves the session, and the session is billed at that model's price, so check it.A routing instance that starts without a route for
transcribe-stream-2. A routing instance learns a deployment's route from a ready instance of that deployment and keeps a route it has learned, so instances already running keep it. One that starts while no instance of the deployment is ready has no route for it, and sends a connection that namestranscribe-stream-2to its default route:transcribe-stream-2, this happens if the routing instance starts while none oftranscribe-stream-2's instances is ready. The default route there istranscribe-stream-1.transcribe-stream-1, it happens if the routing instance starts while that region's stand-in fortranscribe-stream-2(two instances, on different machines) has no ready instance.transcribe-stream-2itself can be up meanwhile.transcribe-stream-2or refuses it (a connection is passed on only once), unless it has no route fortranscribe-stream-2either. So this case also needs the receiving region's route to be missing.When it happens, the connection gets a
transcribe-stream-1session, billed astranscribe-stream-1:session_started.config.modelshowstranscribe-stream-1, and aconfigthat sendsresults.text_formatgetsinvalid_configand close 4400, as the pages describe fortranscribe-stream-1. The windows are narrow. The same happens oncetranscribe-stream-2is removed (a rollback, when this PR is reverted too). A later service change, atranscribe-stream-1that refuses amodelheader naming another model, could close the gap.Service up, engine down. When the service that accepts
transcribe-stream-2connections is up but its transcription engine cannot be reached, the handshake succeeds. The session opens and runs (and is billed per second as usual), and each turn getserrorwithengine_error(code 503, or 504 on a timeout), then a degradedcommitted. The pages cover this: the Models sentence, and Degraded commits and the errors table on the WebSocket reference.A routing instance that starts while its settings store does not answer (not a path to
transcribe-stream-1). It runs without the failover setting fortranscribe-stream-2until it is restarted. In the other regions it then sends a connection that namestranscribe-stream-2to the local stand-in, so the connection can be refused with a 5xx even whiletranscribe-stream-2could take it. A routing instance that is already running when the store stops answering keeps its last setting.x-request-id, and a client cannot tell a restarting 503 from another 503, so thex-request-idsentence now names only the 101 and the capacity 429, and says a 502, 503 or 504 refusal can come with or without one. (Onmainit also names the 503.)engine_error. The pages say "connect again with backoff" only for a refused handshake. Forengine_errorduring a session they say the session continues, as Degraded commits and the errors table already do (it is recoverable).Open points
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."written"is the default (the service's default since 2026-11-25); the pages call it the default and recommend neither value otherwise.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.mdxTested so far
results.text_formatand the second, non-default model route on the same endpoint are released (realtime service 4.2.0, 2026-11-24), and thetranscribe-stream-2deployment runs that release (installed 2026-11-25).session_started.config.model: "transcribe-stream-2";"spoken"gives words;"written"gives digits and symbols ("$25", "3:30", "4172"), as the pages describe.nullcome from the service's protocol notes and code; they are in the live checks below.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 checked all nameresults.text_formatin it. Inconfigureit answersconfiguredwithok: false; the pages leave that to the general rule for unknown fields inconfigure.transcribe-stream-2comes from how the service is deployed and routed, not from the realtime service's own code. It was read in that deployment and routing code, not tried: an outage cannot be staged on the public endpoint.Before merging
Check with live sessions through
wss://api.fish.audio/v1/asr/realtime:model: transcribe-stream-2getssession_started.config.model: "transcribe-stream-2"andresults.text_format: "written"(the default since 2026-11-25)."written"gives digits ("$25", "3:30").configwith"results": {"text_format": 5}getsinvalid_config, close 4400 and the must-be message;nullis accepted and gives"written".transcribe-stream-1.transcribe-stream-1with anytext_formatgetsinvalid_configand close 4400.transcribe-stream-2sessions at the new price.Checks
The branch is one commit on
main(fd7bdc6): the six earlier commits squashed, with one message for the whole change. Changes since the previous head (45c845e): the Models sentence on an unavailabletranscribe-stream-2in both pages (no reconnect advice afterengine_error, no "always"), and thex-request-idsentence on the WebSocket reference. Re-run on this commit:prettier --check(prettier 3.6.2, the repo's version) on the changed.mdx/.ymlfiles: clean, exceptoverview/capabilities.mdx, which already fails onmain(its Card blocks). This PR changes one other 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/. With--check-anchorson the four changed.mdxpages: no findings, so the links#connect,#errors-and-close-codesand#degraded-commitsresolve (the same check reports a deliberately broken#degraded-commitz).mint validate(mint 4.3.88): no findings in the changed files. The 7 existing errors are insnippets/*.jsxandtemp/.mint dev:api-reference/endpoint/websocket/asr-realtimeandfeatures/speech-to-text/realtimerender (HTTP 200) with the new sentences; in the WebSocket reference the Models paragraph haserror,engine_error,committedandsession_started.config.modelas code and the links to Connect, Errors and close codes and Degraded commits.@asyncapi/parser3 onapi-reference/asyncapi-asr-realtime.yml: parsed with no errors or warnings in an earlier round; the YAML has not changed since. It reads back as intended:AsrResults.text_formatisspoken,writtenornull, defaultspoken;AsrResultsUpdatehas notext_format.check-openapifailed (04:51:40Z), as on the previous head, for a reason unrelated to this PR; its job log's diff touches onlyapi-reference/openapi.json. It pulls the live OpenAPI schema and compares it with the committedapi-reference/openapi.json, and the live schema has moved ahead ofmain(the Agentsasr.modeldescription and the phone-numberstatus_reasonfield). This PR does not touchopenapi.json. The open automatic schema update, chore: update OpenAPI schema #408, carries that change, and the check fails the same way on any PR until it merges.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.