wrap rust-whisper-lib as rust-whisper-baked-lib to cook in a model

This commit is contained in:
Bel LaPointe
2023-12-19 22:29:10 -05:00
parent d1ef3e4085
commit 7a9cdd7e4f
3 changed files with 1428 additions and 0 deletions

View 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);
}