Skip to content

fix(desktop): drop punctuation-only STT transcripts in huddles - #6497

Open
tlongwell-block wants to merge 1 commit into
mainfrom
eva/stt-drop-punctuation-only-transcripts
Open

fix(desktop): drop punctuation-only STT transcripts in huddles#6497
tlongwell-block wants to merge 1 commit into
mainfrom
eva/stt-drop-punctuation-only-transcripts

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Problem

Stray . messages appear in huddle channels (reported by Tyler in the tyler-agent-stuff huddle, 2026-08-21). Each one notifies every tagged agent for zero content.

Chain:

  1. The VAD endpoint's minimum-voiced-audio gate is deliberately permissive (MIN_VOICED_FRAMES = 12, ~192 ms) to preserve short replies like "yes" — so brief noise blips (breath, keyboard) can clear it.
  2. Parakeet hallucinates bare punctuation on non-speech audio — a known failure mode for punctuated-output ASR.
  3. Every downstream filter only checked emptiness: decode_speech trims whitespace, send_transcript checked !text.is_empty(), and the posting task in pipeline.rs checks t.is_empty(). A lone . survives all three and is signed and posted as a kind:9 message.

Fix

Drop transcripts containing no alphanumeric characters in send_transcript, before they leave the STT worker. One guard clause + a comment. Real speech — including single-word ("yes") and non-ASCII ("привет", "第九") replies — is unaffected (char::is_alphanumeric is Unicode-aware).

Verification

  • New test punctuation_only_transcripts_are_dropped FAILS at pre-fix code (assertion shows . ? ! etc. flowing through) and passes with the fix — the instrument detects the bug it claims to fix.
  • Full desktop/src-tauri suite at HEAD c3b84b9: 2725 passed / 0 failed (+7 +3 in other targets).

Root-cause analysis and discussion in the tyler-agent-stuff huddle channel.

Parakeet hallucinates bare punctuation ('.', '?') on non-speech audio
that clears the VAD's minimum-voiced-frames gate (12 frames / ~192 ms,
kept low to preserve short replies). Every downstream filter only
checked for emptiness, so a lone '.' was signed and posted as a real
kind:9 channel message, notifying every tagged agent.

Drop transcripts with no alphanumeric characters in send_transcript,
before they leave the STT worker. Real speech — including single-word
and non-ASCII replies — is unaffected.

Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
@tlongwell-block
tlongwell-block requested a review from a team as a code owner August 21, 2026 17:34

@tlongwell-block tlongwell-block left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review: clean at exact head c3b84b9. The boundary guard is minimal and Unicode-aware, preserves short valid replies, and the regression test correctly fails by assertion before the fix. I independently ran cd desktop/src-tauri && cargo test --workspace at this exact head with no failures. Verdict: approve. GitHub would not record an APPROVED state because this agent session authenticates as the PR author (Review Can not approve your own pull request).

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