diff --git a/rust-whisper.d/src/main.rs b/rust-whisper.d/src/main.rs index 1c26795..5a7ece4 100644 --- a/rust-whisper.d/src/main.rs +++ b/rust-whisper.d/src/main.rs @@ -69,6 +69,7 @@ fn main() { data.iter() .map(|x| *x) .step_by(channels.into()) + .step_by((cfg.sample_rate().0 / 16000) as usize) .for_each(|x| buffer.push(x)); if Instant::now() - last > five_seconds { let result = w.transcribe(&buffer).unwrap();