rust-whisper-baked-lib::wav_channel()
parent
cd339de334
commit
601fe517d7
|
|
@ -19,6 +19,15 @@ pub fn wav<F>(
|
|||
rust_whisper_lib::wav(flags.clone(), handler_fn, flags.wav.unwrap());
|
||||
}
|
||||
|
||||
pub fn wav_channel<F>(
|
||||
mut flags: rust_whisper_lib::Flags,
|
||||
handler_fn: F
|
||||
) where F: FnMut(Result<rust_whisper_lib::Transcribed, String>) + Send + 'static {
|
||||
flags.model_path = None;
|
||||
flags.model_buffer = Some(include_bytes!("../../models/ggml-distil-medium.en.bin").to_vec());
|
||||
rust_whisper_lib::wav_channel(flags, handler_fn);
|
||||
}
|
||||
|
||||
pub fn f32_from_wav_file(path: &String) -> Result<Vec<f32>, String> {
|
||||
rust_whisper_lib::f32_from_wav_file(path)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue