Commit b977f7b
committed
fix: Remove redundant audio validation to solve Issue #16 "Audio too quiet"
This commit fixes the false "Audio too quiet - please speak louder" errors
that users were experiencing even when speaking at normal volume.
Problem:
- AudioValidator was using crude energy/amplitude thresholds (0.01 RMS, 0.05 peak)
- These thresholds were rejecting normal speech as "too quiet"
- The validator was duplicating work already done by the transcriber
- WAV files were being read and validated twice unnecessarily
Solution:
- Completely removed AudioValidator module and all its validation logic
- Moved only the essential duration check (0.5s minimum) to transcriber
- Let Whisper's sophisticated VAD handle speech detection with proper parameters:
- no_speech_thold: 0.6
- entropy_thold: 2.4
- logprob_thold: -1.0
- Single validation point, single file read, better performance
Impact:
- Users speaking at normal volume will no longer get false rejection errors
- Improved performance by eliminating duplicate file reads
- Cleaner architecture with proper separation of concerns
- Whisper AI properly determines if speech is present, not crude math
Testing:
- All 143 tests pass
- Recordings under 0.5s are still properly rejected as "too short"
- Silent recordings return "No speech detected" from Whisper (correct)
Fixes #161 parent 6501d99 commit b977f7b
File tree
5 files changed
+150
-1002
lines changed- src-tauri/src
- audio
- commands
- tests
- whisper
5 files changed
+150
-1002
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
0 commit comments