FluidVoice icon indicating copy to clipboard operation
FluidVoice copied to clipboard

[✨ FEATURE] Detect and discard all-silence recordings to prevent hallucinations

Open erdembircan opened this issue 7 months ago • 2 comments

Description

When a user triggers dictation but changes their mind and stops the recording instead of canceling it, the resulting all-silence audio is sent to the transcription model. Whisper-based models hallucinate on pure silence, producing looping text (e.g. "he was a student" repeated endlessly) that gets typed into the active application.

This is a natural usage pattern. Hitting stop instead of cancel is an easy instinct, and it shouldn't produce phantom text.

Testing

Scenario Result
Pure silence, no speech Hallucinated looping text
Leading silence → speech Clean
Speech → trailing silence Clean
Speech → long mid-speech pause → speech Clean

The issue only occurs when the recording contains no speech at all.

Proposed Solution

Add a speech detection check: if no speech is detected in the entire audio buffer, discard it and output nothing. This could be a basic energy/RMS threshold or a lightweight VAD. It doesn't need to be sophisticated since it only needs to distinguish "any speech" from "total silence."

Current Behavior

All-silence recordings are sent to the model, which hallucinates text.

Expected Behavior

All-silence recordings produce no output.

erdembircan avatar Apr 22 '26 08:04 erdembircan

I've been thinking about it too actually. Full silence causes issues. Thinking what's an optimal VAD to do it with

altic-dev avatar Apr 23 '26 06:04 altic-dev

closing it for now as this is not easy to implement easily and might need some research overall . If

altic-dev avatar Jun 15 '26 21:06 altic-dev