You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(eval): time dictations that start where a clip starts, so a cut inside a word stops failing the remote stage - #507
The weekly nightly of 2026-11-02 failed dictation.remote on macOS, Windows and Linux with "the remote heard nothing" (#505). Nothing in the remote changed. The timing stage handed it a dictation that no dictation looks like: a 3 s cut that starts inside a word.
The stage joined FLEURS clips end to end and cut them at exact lengths, so most utterances began mid-word. Parakeet decodes a cut like that to nothing far more often than speech that starts where its speaker does. Over 566 windows of 3 s taken every 0.5 s from 40 clips at a peak of 0.5, 208 came back empty, against 2 of the 40 that start at a clip's start. sherpa-onnx 1.13.8 and 2.0.1 give the same counts (208 and 210).
The server's job pass cuts speech into VAD pieces, and that saved all but one of the night's 31 dictations. The one left was the middle of "dividing the image into thirds". Its 2.37 s speech piece decodes to nothing on both sherpa-onnx versions. On 1.13.8 a 0.36 s sliver of the next word ("vertically") read as "Very", which kept the answer non-empty. On 2.0.1 that sliver reads as nothing. So the guard had been passing on a wrong word, and #486 only removed the word.
The fix
Each utterance now starts where a clip starts and runs on into the next clips when one is shorter, the way a dictation starts where its speaker does. The rest of the clip it ends in is dropped, and utterances reports how many clips it used, so the next length starts after them. FLEURS clips run from 3.84 s up. The guard against an empty answer stays as strict as before.
The latency table's inputs change for every engine (gate: record), and the committed darwin-arm64 entry was measured on the old cuts.
Evidence
Through a loopback akou serve on an M4 mini with the app's RemoteUpload, streamed at real-time pace as the nightly does: the old cuts give 1 empty answer of 31 on 2.0.1 (0 on 1.13.8, where the answer was "Very"). The new cuts give 0 of 31 on 2.0.1 streamed at real-time pace, and 0 of 31 on both versions with the audio sent at once.
Trap [#505] in docs/TRAPS.md. Its test in tests/dictation-latency.test.ts fails on the old cut, because the second utterance started inside a clip, and passes with this change.
On the mini, lint, typecheck and tests/dictation-latency.test.ts plus tests/eval/ pass (33 tests).
What this means for remote dictation in production
There is no regression from sherpa-onnx 2.0.1. The same 31 dictations (old cuts, audio sent at once) through the server at peaks 0.5, 0.05, 0.01, 0.003 and 0.001, on 1.13.8 then 2.0.1, give these empty answers:
peak
1.13.8
2.0.1
0.5
0 (one is the invented "Very")
1 (that cut)
0.05 (-26 dBFS)
0
0
0.01 (-40 dBFS)
5
5
0.003 and below (under -50 dBFS)
31
31
Below -50 dBFS the job's silence gate (silenceDbfs) answers no_speech by design. Between about -40 and -50 dBFS some short dictations come back empty on both versions. The app sends the microphone's samples with no gain, so a very quiet microphone gets an empty remote dictation, as it did before #486.
Two things stay open and are not fixed here. A dictation whose start cuts into a word, for example from a microphone that opens late, still often decodes to nothing on Parakeet. Quiet input around -40 dBFS also loses short dictations on the remote.
…ote stage stops failing on a cut inside a word
The nightly's dictation stage joined FLEURS clips and cut them at exact
lengths, so most utterances began inside a word. Parakeet decodes such a cut
to nothing far more often (208 of 566 3 s windows mid-clip, 2 of 40 at a clip
start, on sherpa-onnx 1.13.8 and 2.0.1 alike). The server's VAD pieces saved
all but one of the night's 31 dictations; that one read as "Very" from a word
sliver on 1.13.8 and as nothing on 2.0.1, so dictation.remote failed on every
platform with no change in the remote.
Each utterance now starts at a clip's start and runs on into the next clips.
Trap [#505] in docs/TRAPS.md; refs #505.
Reviewing files that changed from the base of the PR and between d0057e3 and fe7b0e3.
Files selected for processing: 4
docs/TRAPS.md
scripts/eval/dictation-latency.ts
scripts/eval/nightly.ts
tests/dictation-latency.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Walkthrough
The dictation latency evaluation now starts utterances at clip boundaries, returns the number of clips consumed, and uses that count to advance through the remaining clips.
Changes: Dictation latency evaluation
Layer / File(s)
Summary
Clip-aligned utterance generation and nightly integration scripts/eval/dictation-latency.ts, scripts/eval/nightly.ts, tests/dictation-latency.test.ts, docs/TRAPS.md
utterances returns the generated utterances and the number of clips consumed. It drops unused samples after an utterance ends. dictationStage advances by the returned count. Tests cover clip alignment, continuation into the next clip, and requests that exceed available clips. The trap documentation records the mid-clip cut issue.
The nightly evaluation has sufficient clips for the new alignment behavior. No material merge risk remains.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: starting timed dictations at clip boundaries to prevent failures from cuts inside words.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 3 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Biome (2.5.15)
scripts/eval/dictation-latency.ts
Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.
scripts/eval/nightly.ts
Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.
tests/dictation-latency.test.ts
Biome could not lint this file: configuration resulted in errors. Check the repository's Biome configuration and plugins.
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.
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
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.
The weekly nightly of 2026-11-02 failed
dictation.remoteon macOS, Windows and Linux with "the remote heard nothing" (#505). Nothing in the remote changed. The timing stage handed it a dictation that no dictation looks like: a 3 s cut that starts inside a word.The stage joined FLEURS clips end to end and cut them at exact lengths, so most utterances began mid-word. Parakeet decodes a cut like that to nothing far more often than speech that starts where its speaker does. Over 566 windows of 3 s taken every 0.5 s from 40 clips at a peak of 0.5, 208 came back empty, against 2 of the 40 that start at a clip's start. sherpa-onnx 1.13.8 and 2.0.1 give the same counts (208 and 210).
The server's job pass cuts speech into VAD pieces, and that saved all but one of the night's 31 dictations. The one left was the middle of "dividing the image into thirds". Its 2.37 s speech piece decodes to nothing on both sherpa-onnx versions. On 1.13.8 a 0.36 s sliver of the next word ("vertically") read as "Very", which kept the answer non-empty. On 2.0.1 that sliver reads as nothing. So the guard had been passing on a wrong word, and #486 only removed the word.
The fix
Each utterance now starts where a clip starts and runs on into the next clips when one is shorter, the way a dictation starts where its speaker does. The rest of the clip it ends in is dropped, and
utterancesreports how many clips it used, so the next length starts after them. FLEURS clips run from 3.84 s up. The guard against an empty answer stays as strict as before.The latency table's inputs change for every engine (
gate: record), and the committeddarwin-arm64entry was measured on the old cuts.Evidence
akou serveon an M4 mini with the app'sRemoteUpload, streamed at real-time pace as the nightly does: the old cuts give 1 empty answer of 31 on 2.0.1 (0 on 1.13.8, where the answer was "Very"). The new cuts give 0 of 31 on 2.0.1 streamed at real-time pace, and 0 of 31 on both versions with the audio sent at once.[#505]indocs/TRAPS.md. Its test intests/dictation-latency.test.tsfails on the old cut, because the second utterance started inside a clip, and passes with this change.tests/dictation-latency.test.tsplustests/eval/pass (33 tests).What this means for remote dictation in production
There is no regression from sherpa-onnx 2.0.1. The same 31 dictations (old cuts, audio sent at once) through the server at peaks 0.5, 0.05, 0.01, 0.003 and 0.001, on 1.13.8 then 2.0.1, give these empty answers:
Below -50 dBFS the job's silence gate (
silenceDbfs) answersno_speechby design. Between about -40 and -50 dBFS some short dictations come back empty on both versions. The app sends the microphone's samples with no gain, so a very quiet microphone gets an empty remote dictation, as it did before #486.Two things stay open and are not fixed here. A dictation whose start cuts into a word, for example from a microphone that opens late, still often decodes to nothing on Parakeet. Quiet input around -40 dBFS also loses short dictations on the remote.
Refs #505 (the soak half is handled separately).
Summary by CodeRabbit