Skip to content

Commit b977f7b

Browse files
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 #16
1 parent 6501d99 commit b977f7b

File tree

5 files changed

+150
-1002
lines changed

5 files changed

+150
-1002
lines changed

src-tauri/src/audio/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ pub mod level_meter;
22
pub mod recorder;
33
pub mod resampler;
44
pub mod silence_detector;
5-
pub mod validator;

0 commit comments

Comments
 (0)