Idea: flag likely-hallucinated segments after transcription (fits the plugin system)
Saw #1500 is still open with no real fix beyond "try a different model," and the two things that already touch this (#816, #1412) don't quite cover it either — #816 only strips text with zero real characters, and only on the live-mic recording path. #1412's VAD in whisper.cpp helps prevent some hallucinations during decoding, but that's not the same as catching them after the fact, and it doesn't help on other backends.
What might help: a post-transcription pass that flags (doesn't delete) segments that look hallucinated, using a few cheap heuristics — any one being enough to flag:
- exact match against a short list of known Whisper silence junk ("thanks for watching," "[Music]," stray "...", etc.), matched against the whole segment so it doesn't trip on a real sentence that happens to contain similar words
- a word or short n-gram repeating 3+ times in a row within one segment (the classic silence-loop pattern)
- a segment whose start/end doesn't overlap any VAD speech interval, when VAD data is available
after_transcription in the plugin system already gets the segment list on a background thread, so this seems like a natural fit as a plugin rather than a core change — tag flagged segments (e.g. suspect / suspect_reason) and let the viewer highlight them so people can review instead of the app guessing for them. No new dependencies needed, it's just regex/string matching.
Not planning to build this myself right now, just dropping the idea here in case someone wants to run with it — happy to talk through details. I maintain another Whisper-based transcription app with a working version of this exact thing, can share as reference if useful.
Source: chidiwilliams/buzz