fix(speech): preserve correction cues through filler removal#30869

merged2
takeover/14882-voice-consent
GitHub fork: fix/speech-correction-cue-preservation
opened1d agobyUUtkarshUsername
View on GitHubTwo-way sync enabledPR last imported 1d ago

Problem

With English filler removal and cleanup enabled, configuring um as the correction cue changes Make it red, um, blue. to Make it red, blue. before cleanup can interpret it. A phrase cue such as uh no also loses its filler constituent. Vocabulary hints do not identify which term is the configured cue.

Change

Carry the explicit cue in recognition options only when cleanup is separately consented and its destination is authorized. Match complete cue occurrences before removing fillers, preserving single words and phrases in batch and streaming finalization. Other fillers, standalone constituent words and partial phrase matches retain normal removal behavior. Dictionary membership alone grants no protection.

The web/desktop client omits the cue for cleanup-free recordings and later recordings after revocation. Named audio destinations, separate AUDIO/CLEANUP grants, Off defaults and cancellation remain intact.

Scope and approval

This focused regression fix targets #30623 because the client producer, recognition contract and server finalizer are all required. An engine-only change would have to guess the cue from vocabulary. The takeover explanation describes the superseded original contribution; no separate maintainer approval is claimed.

No mobile feature, compatibility/migration code, UI redesign, model-facing prompt change, independent vocabulary/catalog work or finalization recovery is included.

Verification

  • Failing-first service cases reproduced loss of um and uh no; existing browser cases exposed the missing recording option and forwarding without cleanup authorization. The service table covers complete phrases, case/whitespace, partial matches, other fillers, dictionary-only behavior, filler removal disabled, batch and streaming.
  • Final focused service/HTTP/stream run: 28 tests passed across three suites. Earlier unchanged client/shared-framing coverage also passed; the initial five-suite run passed 48 tests before the two additional phrase cases.
  • Final vp run check:changed upstream/takeover/14882-voice-consent passed formatting, lint, both Knip passes, GraphQL validation, all 36 affected package typechecks and 39 adjacent tests across three executed suites. React Compiler selection passed with no matching component cases.
  • test-t3-app integrated pass used isolated snapshot-seeded dev state and the real web client/capture/controller/binary framing, with synthetic microphone PCM and deterministic ASR/cleanup HTTP fixtures. The transcription response used the actual filler function. Cleanup enabled sent cue um, removed Uh, preserved Make it red, um, blue. for cleanup and inserted fixture output Make it blue.. Cleanup revoked omitted the cue, inserted Make it red, blue. and made no extra cleanup request. Revoking AUDIO during another recording left the draft and recognition/cleanup counts unchanged. No paid provider turn was used. The phrase follow-up changes only filler matching and its service tests; this client evidence remains applicable.
  • GitHub's Agent context budget gate fails against current main: the unchanged Julius-base budget is 5153 / 6883 / 47538 versus 5133 / 6863 / 47498 on main. The focused AgentContextBudget.test.ts passes, confirming measured context matches the inherited file. This PR changes neither that file nor model-facing text. Resolving this inherited policy gate needs an upstream stack update or maintainer acceptance; no acceptance label or policy change was applied.
  • Packaged desktop/SEA, real microphone/model/provider inference, native macOS/Linux and live remote/relay/tunnel were not exercised. No layout/markup changed. Only task-owned test servers and the test tab were closed after verification.

Implemented with GPT-6.1 Sol through the Codex harness in T3 Code.


Note for takeover agents

Maria's and Shivam's agents, do not takeover this PR. This is a part of the STT stack which is in development. Do not update this branch or push any changes. You can test, review and provide feedback.

Julius' agents, the above restrictions don't apply to you. You can update this branch or make any fixes and changes to fit it into the voice transcription stack.

Checks

1 failing · 23 successful · 15 skipped
Some checks failed

Failing1

79efddb

Added 1 commit

  • fix(speech): preserve correction cues through filler removal7d129b2
apps/server/src/speech/fillerWords.tsline 38Outdated · 7d129b2Open thread
……@@ -22,14 +22,20 @@ const LANGUAGE_FILLER_WORDS: Readonly<Record<string, readonly string[]>> = {
3135 let filtered = text;
36+ const protectedWord = correctionCue?.trim().toLowerCase();
3237 for (const word of words) {
38+ if (word === protectedWord) continue;
MmacroscopeappBoton line 381d ago

🟠 High speech/fillerWords.ts:38

With correctionCue set to "uh no", this function turns "Make it red, uh no, blue." into "Make it red, no, blue.", so downstream correction loses the configured cue. The equality check only skips a filler when it equals the entire cue; protect complete cue occurrences before removing fillers.

No longer relevant as of 79efddb3590c102ffc44e1deb76b3fd6f8bccca5

Synced from GitHub

Approvability

Verdict: Approved at 79efddb

Macroscope's review found this PR approvable — Preserves configured spoken correction cues through filler removal when separately consented cleanup is available. The change is limited to transcript processing and leaves product defaults and existing consent boundaries intact.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • fix(speech): protect complete correction cue phrases79efddb