Update whisper.cpp to latest git (closes #240)

This commit is contained in:
Niko 2025-08-19 16:06:50 -07:00
parent 43e31a7345
commit b376a1ef64
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View file

@ -86,6 +86,15 @@ pub unsafe fn set_log_callback(
}
}
/// Get the current `whisper.cpp` version.
pub fn get_whisper_version() -> &str {
let ptr = unsafe { whisper_rs_sys::whisper_version() };
assert!(!ptr.is_null());
unsafe { CStr::from_ptr(ptr) }
.to_str()
.expect("Whisper version should be valid UTF-8")
}
/// Print system information.
///
/// # C++ equivalent