cargo run -- --stream-step 8 --stream-retain 4 --stream-head=2 --stream-tail=0 2> /dev/null

This commit is contained in:
Bel LaPointe
2024-01-03 08:37:27 -07:00
parent a8c8140d18
commit cbc8a4f9fd
3 changed files with 8 additions and 3 deletions

View File

@@ -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<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); },
};
},