try the model-baked-in-cli-version
This commit is contained in:
17
rust-whisper-baked/src/main.rs
Normal file
17
rust-whisper-baked/src/main.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use rust_whisper_lib;
|
||||
use clap::Parser;
|
||||
|
||||
fn main() {
|
||||
let mut flags = rust_whisper_lib::Flags::parse();
|
||||
flags.model_path = None;
|
||||
flags.model_buffer = Some(include_bytes!("../../models/ggml-small.en.bin").to_vec());
|
||||
rust_whisper_lib::main(
|
||||
flags,
|
||||
|result: Result<rust_whisper_lib::Whispered, String>| {
|
||||
match result {
|
||||
Ok(whispered) => { println!("{}", whispered.to_string()); },
|
||||
Err(msg) => { eprintln!("error: {}", msg); },
|
||||
};
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user