wrap rust-whisper-lib as rust-whisper-baked-lib to cook in a model
This commit is contained in:
10
rust-whisper-baked-lib/src/lib.rs
Normal file
10
rust-whisper-baked-lib/src/lib.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use rust_whisper_lib;
|
||||
|
||||
pub fn main<F>(
|
||||
mut flags: rust_whisper_lib::Flags,
|
||||
handler_fn: F
|
||||
) where F: FnMut(Result<rust_whisper_lib::Whispered, String>) + Send + 'static {
|
||||
flags.model_path = None;
|
||||
flags.model_buffer = Some(include_bytes!("../../models/ggml-small.en.bin").to_vec());
|
||||
rust_whisper_lib::main(flags, handler_fn);
|
||||
}
|
||||
Reference in New Issue
Block a user