[Bug] Voice-to-text dictation produces hallucinations / incorrect transcriptions
Summary
Voice-to-text (speech-to-text / dictation) sometimes outputs incorrect or hallucinated text that does not match what the user said. We need to reduce false transcriptions and improve reliability.
##Action- You can debug using the script- cargo run voice.
Problem
- Transcriptions include words/phrases the user did not say.
- Output can be unstable across similar utterances or quiet/noisy conditions.
- Users lose trust in dictation for real workflows.
Scope
Applies to the app’s voice-to-text path (local and/or cloud STT, depending on configuration).
Tasks
- [ ] Reproduce with concrete examples (audio samples + expected vs actual text) — attach anonymized clips if possible.
- [ ] Audit pipeline: capture settings, sample rate, VAD/silence handling, chunking, language detection, model selection.
- [ ] Review post-processing (punctuation, autocorrect, LLM cleanup if any) for sources of hallucination.
- [ ] Tune defaults:
- [ ] language/locale
- [ ] model siz accuracy tradeoffs
- [ ] noise suppression / endpointing
- [ ] Add metrics/logging for confidence scores where available; surface low-confidence UX.
- [ ] Add regression tests (golden audio fixtures) for known bad cases.
Acceptance criteria
- [ ] Measurable reduction in incorrect transcriptions on recorded repro cases.
- [ ] Clear user-visible behavior when confidence is low (retry / show alternate / prompt to re-speak).
- [ ] Documented recommended settings for noisy environments.
Notes
If multiple STT backends exist (local vs cloud), split fixes per backend and document differences.
we dealt with this exact problem building a voice-first macOS app. the root cause is almost always silence handling. whisper models were trained on YouTube content, so when they get quiet audio they hallucinate things like 'thank you for watching' or 'subscribe for more'. the fix that worked for us was adding a VAD gate before the whisper pipeline, basically rejecting audio chunks below a minimum energy threshold so whisper never even sees the silence. we also set no_speech_threshold to around 0.6 and temperature to 0.0 for the initial decode pass. combined those two changes eliminated maybe 95% of the phantom text.
our on-device voice transcription service with the VAD gating and silence threshold tuning I mentioned: https://github.com/m13v/fazm/blob/main/Desktop/Sources/TranscriptionService.swift
Resolved by #409 — added per-segment confidence filtering, upgraded default STT model, real-time silence gating, and fixed Fn push-to-talk race conditions.
thanks for the feedback @m13v greatly appreciate 🙌 gonna incorporate that in