wrap rust-whisper-lib as rust-whisper-baked-lib to cook in a model
parent
d1ef3e4085
commit
7a9cdd7e4f
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "rust-whisper-baked-lib"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rust-whisper-lib = { path = "../rust-whisper-lib" }
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue