Repository navigation
docs: match speech-to-text docs to the validated scope - #639
Merged
Merged
Conversation
State where the STT pack has passed and which native targets and backends have no STT run, document the edge-fixture outcomes and the cancel/memory budgets, narrow MP3/FLAC and five-minute recordings to what real-model checks cover, fix the LiteRT snippet that failed analysis, restore the orphaned chat-app README sentence, and add the missing [#594](#594) changelog entry. Part of [#325](#325).
validation-speech-stt passed 20/20 twice on Linux x64 CPU (AMD EPYC 7B12) at 1584e7d with native v0.4.1-1, replacing the earlier native v0.4.1 run in the guide's validated scope. Also rewraps two long guide lines.
leehack
marked this pull request as ready for review
September 24, 2026 01:39
Contributor
|
Chat app preview removed for |
6 tasks
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.
Summary
Part of #325 (gate 5: docs, examples and the support matrix match the validated scope).
Docs only. Runtime behaviour is unchanged. Outside docs: dartdoc text in
speech_platform_stub.dartand the validation package'sspeech_runner.dart, thecoversstring of one matrix row, and theedge_long_boundaryrationale string thatspeech-results.jsonrecords.StateError(capabilities.unsupportedReason)passed aString?as aString. Also printcompletion.stateso the snippet has no unused local.validation-speech-sttruns and the required outcome of each edge fixture: silence gives the typed empty-transcript error; a truncated RIFF gives an inexact transcript orLlamaAudioFormatException; 44.1 kHz stereo gives the reference; 33 s gives the reference three times. It also states the 500 ms cancel and 1.10x memory budgets, what each one measures, and where the pack has passed.speech_platform_stub.dart: dartdoc "Encoded formats validated" becomes "Encoded formats accepted".CHANGELOG.md,recent-releases.md): the #325 edge-fixture entry no longer says the LiteRT-ASR and TTS packs "keep their existing check count". A #594 entry follows it (8 to 15 lifecycle checks).doc/cross_platform_validation.mdand thevalidation-speechrow intest_matrix.dartnow name the edge fixtures, and the row also names the bounds.35074e592(2bd6c969e,e6849aa81):edge_long_boundaryrationale (now "Audio over 30 seconds must be transcribed in full."). The fixture itself is unchanged.chat-app.mdnow state what #636 measured (297 s, native macOS arm64 CPU, 4,096-token context); the guide's truncation sentence is qualified "On native".speechWordErrorRatedartdoc now say exactly what the WER normalizes: lowercase,.,!?:;"—–replaced with spaces, split on whitespace.mainate5cedd250(mergeb5d743615, then5022c0b53):5022c0b53: the guide now cites the Linux x64 CPU runs at nativev0.4.1-1instead of the earlier nativev0.4.1run, and rewraps two long lines.Production-readiness scope
Validation sources for the new claims
ae7b745on nativev0.4.1-1. Worst in-flight cancel 60.2 to 180.5 ms, immediate cancel 0.92 ms or less, RSS growth 1.0081 to 1.0110. Truncated RIFF gaveAnswer.ae7b745. The runtime reportedMetalwith 99 GPU layers andaccelerator_execution_verified: false. Worst in-flight cancel 2.7 and 2.9 ms. Truncated RIFF gaveAnd so.main1584e7d4f, nativev0.4.1-1. The linux-x64 archive SHA-2563f139762a1a38deafbe4a08ae76ea317e386423f66729696cfbbc98bcb528463(176,608,623 bytes) matches the release asset. The runtime reportedCPUwith 0 GPU layers. Worst in-flight cancel 289.6 and 183.6 ms, worst immediate cancel 1.475 and 1.579 ms, RSS growth 1.0554 and 1.0267. Truncated RIFF gaveAnd so.; the 33 s fixture gave the reference three times (WER 0).speech_edge_fixtures.dart(3 s silence;jfk.wavcut to its first 20,044 bytes; 44.1 kHz stereo; 3 repeats = 33 s). Inspeech_runner.dart: 500 ms / 500 ms / 1.10x, lead fraction 0.5, 3 cycles.speechLifecycleCheckCountis 8 before 49ee245 (#594) and 15 after.b29c606(nativev0.4.1andv0.4.1-1),PROJECTOR_TYPE_QWEN3Ausesmtmd_audio_preprocessor_qwen3a(mtmd.cpp:939-943), which cuts audio into 800-mel-frame (8 s) windows (mtmd-audio.cpp:697-722); each window is its own audio chunk (mtmd.cpp:1605-1638).clip.cpp:1781setsaudio_chunk_len = 30, but only the log line atclip.cpp:2072and the dots3note preprocessor (mtmd-audio.cpp:753) read it. The independent review's CPU run logged 2 audio chunks for the 11 sjfk.wav(104 + 52 tokens) and 5 for the 33 s fixture (4 x 104, then 26).ae7b745, macOS arm64 CPU, nativev0.4.1-1, ctx 4096, 179/594 words, statecompleted.speechWordErrorRate(speech_runner.dart:14-20):toLowerCase(), then.,!?:;"—–replaced with spaces, then split on whitespace.windows-x64-ci-runtimePASS, Moonshine final text containingcountry.speech_to_text_test.dart:50andspeech_platform_stub_test.dart:15assert the native format set.speech_to_text_web_test.dart:242checks that Web rejects MP3 bytes. No test undertest/,example/chat_apporpackages/llamadart_validationdecodes MP3 or FLAC.downloadable_model.dartsetswebSupportsSpeechToText: true. Inchat_provider.dart, the Web picker acceptswav, andmaxAudioRecordingDuration(5 min) auto-stops and transcribes. The preset hascontextSize: 4096.The ASR and chat-app tests do not reach these doc edits. The
static-format-analyze,root-vmandvalidation-harnesschecks guard only the dartdoc, matrix-string and rationale-string edits.Completeness checklist
PR type guidance
lib/change is dartdoc text only; the validation package changes one dartdoc and one rationale string. Docs were validated with./tool/docs/build_site.shvia./tool/docs/validate_links.sh.Test Plan
All at
5022c0b53, macOS arm64, Flutter 3.47.1 / Dart 3.13.1. The tree was clean before and after.e6849aa81passed the same gates earlier.dart run tool/prepare_workspace.dart: rc 0; 0 tracked files changed.dart format --output=none --set-exit-if-changed .: 741 files, 0 changed.dart analyze --fatal-infos: no issues.dart run tool/testing/check_platform_boundaries.dart: OK.dart run tool/testing/verify_release_docs_versions.dart: rc 0. It reports the pendingllamadart_llama_cpp_fluttercompanion bump, which already exists onmainand is not changed here../tool/docs/validate_links.sh(runsbuild_site.sh): build passed with broken links set to throw.packages/llamadart_validation:dart pub get,dart analyze --fatal-infos(no issues),dart test(+177, all passed).dart test -p vm -j 1 --exclude-tags local-only: +2974 ~78, all passed.dart test -p chrome --exclude-tags local-only: N/A. No web-reachable change.speech_platform_stub.dartis the non-js_interopbranch of a conditional import, and its edit is a comment.35074e592; later commits and the merge touch nodartblock): I extracted all fourdartblocks, wrapped each in a function, and randart analyze --fatal-infosin the clone (then deleted the file). Before the fix:argument_type_not_assignable(String?toString). After: no issues.Matrix Evidence
static-format-analyzeroot-vmvalidation-harnessdart analyze --fatal-infosno issues;dart test+177root-chromecoverage-liblib/behaviour change (dartdoc only).docs-sitevalidate_links.shvalidation-speech1584e7d4f; none rerun at this head: docs-only PR.speech-to-text-smoke,web-speech-to-text-smoke,physical-ios-speech-e2ehigh-risk-exact-head-independent-qa5022c0b53/e5cedd250by a fresh independent reviewer, 0 blocking findings; readiness evaluator exit 2 (unverifiedPrerequisites); see the high-risk block.Mutations
:54restored toStateError(capabilities.unsupportedReason)dart analyzeof the extracted snippets:argument_type_not_assignable. No repository test covers doc text.No repository test pins the other edits: guide, README and changelog prose, the dartdoc wording, the
coversstring, or theedge_long_boundaryrationale string. No mutation of them can turn a test red.Review Notes
5022c0b53againste5cedd250by a fresh independent reviewer, 0 blocking findings; see the high-risk block. Earlier,e6849aa81was accepted against7556d2681, and35074e592was rejected for the false 30-second chunk claim, fixed in2bd6c969eande6849aa81.5022c0b536410862e950394354009d4968e057e2: 28 check runs, 23 success, 5 skipped, 0 failed.High-risk regression review
5022c0b536410862e950394354009d4968e057e2/e5cedd250d3a9c29598d01cae97227aba73013cb. It supersedes the acceptance ate6849aa81/7556d2681.backendRuntime,regressionPolicy).classify_high_risk_changes.dartongit diff --name-only --no-renames e5cedd250...HEADat the head:lib/src/core/speech/speech_platform_stub.dart(dartdoc text only) andtool/testing/test_matrix.dart(thevalidation-speechcoversstring only) classify as high-risk; the other 10 paths classify as standard.5022c0b53, 0 blocking findings. The review is by a fresh independent reviewer with no part in writing this PR, its fix-ups or the earlier reviews. It covered every changed line of the 12 files againste5cedd250, with extra care on the merge and5022c0b53. One attempt with a second review tool, at high reasoning effort, also found no blocking defect; the review does not rely on it.b5d743615equals the automatic merge ofe6849aa81ande5cedd250(git merge-tree, no conflicts). Nothing merged contradicts the PR. #637 changes onlyspeech_runner_test.dart, pinning the 500 ms, 1.10x and 0.5 values the docs state. From #638, the guide'sloadMultimodalProjectorexception paragraph agrees with "Projector load success alone does not prove audio support", the silence row's message still matchesspeech_to_text.dart:1004, and its new real-model checks only attempt projector loads and transcribe nothing.5022c0b53: both Linuxspeech-results.jsonfiles showfunctional_passtrue, 20/20 PASS,linux_x64,backend_nameCPUwith 0 GPU layers, the samemodel_lock_hash, truncated RIFFAnd so., and the 33 s fixture at WER 0 with 3 repeats. Worst in-flight cancel is 289.597 and 183.595 ms, worst immediate cancel 1.475 and 1.579 ms, RSS growth 1.0554 and 1.0267. Both files match the SHA-256 digests the run recorded. The run log shows clone1584e7d4fonmain, AMD EPYC 7B12, and thenative_bundles/v0.4.1-1/linux-x64archive, whose SHA-256 and size equal thellamadart-nativev0.4.1-1release asset. The runs usedvalidation.dart speech --pack stt --backend cpu, the command thevalidation-speech-sttscenario runs, and the validation package at1584e7d4fdiffers from the head only in theedge_long_boundaryrationale string and one dartdoc; the library has since gained #620 and #638. The macOS runs atae7b745also pinv0.4.1-1. The two rewrapped lines change no words.generate, the 3 cycles, and the WER normalization; the chat-app preset (contextSize: 4096, five-minute auto-stop, Webwavpicker, bridgev0.1.30+gate); the silentcurrentPos >= nCtxstop inllama_cpp_service.dart; the #636 numbers. Both changelog bullets sit underUnreleasedand mirror each other; #594 (49ee24594) is not inv0.8.24.git diff --checkis clean.prepare_workspacerc 0 and clean; format 741 files, 0 changed;dart analyze --fatal-infosandcheck_platform_boundariesclean;test/unit/tooling/plustest/unit/core/speech/+540 ~4;packages/llamadart_validationanalyze clean and+177; full VM+2974 ~78;verify_release_docs_versionsrc 0 with the known pending companion bump.validate_links.shfound nowebsite/node_modulesin that batch, then passed in a second locked run (01:11:43Z to 01:13:02Z, loadavg 10.38 to 11.35) withnode_modulescopied from an earlier clone at the same lock file. The guide's fourdartblocks, unchanged since35074e592, analyze clean (00:57:55Z, loadavg 19.49).toLowerCase(1 red), WER without the comma (1 red), truncated-RIFF contractwer >= 0(2 red), memory baseline atload(1 red), 2 repeats, 22 s (1 red), native format set withoutmp3(4 red), cancel budget 501 ms (1 red), immediate-cancel budget 501 ms (1 red), memory budget 1.11x (1 red), lead fraction 0.6 (1 red). Renaming thevalidation-speechrow's command scenario to one the runner does not define turnsrows name local E2E scenarios that the runner definesred.coversstring or theedge_long_boundaryrationale: the dash and rationale mutations survived, and no test references thecoverstext.validation-speech-sttscenario always passes--backend cpu; the Metal runs the guide cites pass--backend metaltovalidation.dart speech --pack sttdirectly.5022c0b536410862e950394354009d4968e057e2/e5cedd250d3a9c29598d01cae97227aba73013cb(GitHubbaseRefOid, a parent of the mergeb5d743615), read frompulls/639and GraphQL at the start of the review, before evaluation and before this edit; draft, 0 review threads, 0 reviews.speech_platform_stub_test.dart(native format set withoutmp3:native platform accepts file input and unencoded audiored) andtest_matrix_test.dart(the renamed scenario:rows name local E2E scenarios that the runner definesred).dart run tool/testing/high_risk_readiness.dartat 01:14:24Z (loadavg 11.09), with repository, PR, author, head and base from a fresh GitHub API query: exit 2,unverifiedPrerequisites(externalPrerequisitesUnavailable), over 12 changed files. That is the best local result: the evidence is internally consistent, and the external prerequisites do not exist.validation-speech-sttresults cited above (macOS arm64 CPU and Metal atae7b745, Linux x64 CPU at1584e7d4f, all on nativev0.4.1-1); none rerun at this head: docs-only PR, runtime unchanged.