diff --git a/listen-lib/src/lib.rs b/listen-lib/src/lib.rs index b762513..cea4f3b 100644 --- a/listen-lib/src/lib.rs +++ b/listen-lib/src/lib.rs @@ -95,6 +95,7 @@ impl Listener { let cfg = device.supported_input_configs() .unwrap() .filter(|x| x.sample_format() == cpal::SampleFormat::F32) + .filter(|x| x.min_sample_rate() >= cpal::SampleRate(15_500)) .nth(0) .unwrap() .with_max_sample_rate(); diff --git a/rust-whisper-baked-lib/src/lib.rs b/rust-whisper-baked-lib/src/lib.rs index 9b97127..3191e85 100644 --- a/rust-whisper-baked-lib/src/lib.rs +++ b/rust-whisper-baked-lib/src/lib.rs @@ -5,7 +5,7 @@ pub fn wav( handler_fn: F ) where F: FnMut(Result) + Send + 'static { flags.model_path = None; - flags.model_buffer = Some(include_bytes!("../../models/ggml-base.en.bin").to_vec()); + flags.model_buffer = Some(include_bytes!("../../models/ggml-small.en.bin").to_vec()); rust_whisper_lib::wav(flags.clone(), handler_fn, flags.wav.unwrap()); }