diff --git a/rust-whisper-baked-lib/src/lib.rs b/rust-whisper-baked-lib/src/lib.rs index b28c118..d03deeb 100644 --- a/rust-whisper-baked-lib/src/lib.rs +++ b/rust-whisper-baked-lib/src/lib.rs @@ -33,7 +33,7 @@ pub fn f32_from_wav_file(path: &String) -> Result, String> { } fn get_fast() -> Vec { - include_bytes!("../../models/ggml-base.en.bin").to_vec() + include_bytes!("../../models/ggml-small.en.bin").to_vec() } fn get_good() -> Vec { diff --git a/rust-whisper-baked/src/main.rs b/rust-whisper-baked/src/main.rs index 9eba5ab..b65c99a 100644 --- a/rust-whisper-baked/src/main.rs +++ b/rust-whisper-baked/src/main.rs @@ -48,11 +48,15 @@ fn channel(flags: rust_whisper_lib::Flags) { eprintln!("rust whisper baked lib channel..."); thread::spawn(move || { + let mut w = new_destutterer(); rust_whisper_baked_lib::channel( flags.clone(), - |result: Result| { + move |result: Result| { match result { - Ok(transcribed) => { println!("{}", transcribed.to_string()); }, + Ok(transcribed) => { + let s = w.step(transcribed.to_string()); + println!("{}", s); + }, Err(msg) => { eprintln!("error: {}", msg); }, }; }, diff --git a/todo.yaml b/todo.yaml index 684347e..df5626d 100755 --- a/todo.yaml +++ b/todo.yaml @@ -1,4 +1,5 @@ todo: +- whisper trims outside silence so head and tail never get hit - split on silence-ish instead of duration - rust-whisper warn when transcription time ~ input time scheduled: []