rust-whisper-baked listen also destutters

master
Bel LaPointe 2024-01-02 16:12:07 -07:00
parent 6082f7e446
commit d0dc9571d7
1 changed files with 6 additions and 2 deletions

View File

@ -29,10 +29,14 @@ fn wav_channel(flags: rust_whisper_lib::Flags) {
}
fn wav(flags: rust_whisper_lib::Flags, _path: String) {
let mut w = new_destutterer();
rust_whisper_baked_lib::wav(flags,
|result: Result<rust_whisper_lib::Transcribed, String>| {
move |result: Result<rust_whisper_lib::Transcribed, String>| {
match result {
Ok(transcribed) => { println!("{}", transcribed.to_string()); },
Ok(transcribed) => {
let s = w.step(transcribed.to_string());
println!("{}", s);
},
Err(msg) => { eprintln!("error: {}", msg); },
};
},