Skip to content

fix(eval): time dictations that start where a clip starts, so a cut inside a word stops failing the remote stage - #507

Merged
GeiserX merged 1 commit into
mainfrom
fix/remote-dictation-quiet
Nov 2, 2026
Merged

GeiserX merged 1 commit into
mainfrom
fix/remote-dictation-quiet

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

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.

Refs #505 (the soak half is handled separately).

Summary by CodeRabbit

  • Improvements
    • Dictation timing evaluations now begin utterances at clip boundaries and continue across clips when needed, avoiding artificial mid-word starts.
    • Evaluation runs now account for the clips actually consumed when selecting utterances of different lengths.
  • Documentation
    • Added guidance on avoiding clip cuts that can produce empty recognition results.

…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.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to fe7b0

The nightly evaluation has sufficient clips for the new alignment behavior. No material merge risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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 Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

@GeiserX
GeiserX merged commit 785dabf into main Nov 2, 2026
31 of 38 checks passed
@GeiserX
GeiserX deleted the fix/remote-dictation-quiet branch November 2, 2026 16:51
@GeiserX GeiserX mentioned this pull request Nov 2, 2026
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