Skip to content

[BUG] Short Whisper transcripts are dropped by text-length confidence heuristic #675

Description

@themaddoxed

Bug description

Live Whisper transcription can silently drop short but valid utterances such as acknowledgements, confirmations, and brief replies.

Current behavior

WhisperEngine::transcribe_audio_with_confidence derives a confidence-like value from the UTF-8 byte length of the decoded segment. The live transcription worker then rejects non-empty results below a 0.3 threshold.

Several common English replies fall below that threshold:

  • OK receives approximately 0.12.
  • Yes receives approximately 0.13.
  • No receives approximately 0.12.
  • Sure receives approximately 0.14.
  • Got it receives approximately 0.16.
  • Thanks receives approximately 0.16.

All of these can be skipped even though Whisper returned non-empty text. The derived value is not an acoustic or token probability.

Expected behavior

A non-empty transcript returned after VAD and Whisper's own no-speech handling should be emitted. The current confidence value may remain available as metadata, but it should not decide whether the transcript is discarded.

Proposed fix

  • Base transcript emission on non-empty content rather than the uncalibrated confidence value.
  • Keep empty and whitespace-only results filtered out.
  • Add regression coverage for several short English utterances and a whitespace-only result.

Affected revision

Reproduced on devtest at 0bedd8b.

Checklist

  • Searched for a similar issue
  • Identified the root cause in the live transcription worker
  • Added a failing regression test before the fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions