Update whisper.cpp to 8e46ba80d3c1dcf532a0029f9bcdf99ce9ce7d40
This commit is contained in:
parent
3ca3a5deb6
commit
66f8aaeb86
3 changed files with 18 additions and 19 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
//! Standalone functions that have no associated type.
|
//! Standalone functions that have no associated type.
|
||||||
|
|
||||||
use crate::WhisperToken;
|
|
||||||
use std::ffi::{c_int, CStr, CString};
|
use std::ffi::{c_int, CStr, CString};
|
||||||
|
|
||||||
/// Return the id of the specified language, returns -1 if not found
|
/// Return the id of the specified language, returns -1 if not found
|
||||||
|
|
@ -54,23 +53,6 @@ pub fn get_lang_str(id: i32) -> Option<&'static str> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// task tokens
|
|
||||||
/// Get the ID of the translate task token.
|
|
||||||
///
|
|
||||||
/// # C++ equivalent
|
|
||||||
/// `whisper_token whisper_token_translate ()`
|
|
||||||
pub fn token_translate() -> WhisperToken {
|
|
||||||
unsafe { whisper_rs_sys::whisper_token_translate() }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the ID of the transcribe task token.
|
|
||||||
///
|
|
||||||
/// # C++ equivalent
|
|
||||||
/// `whisper_token whisper_token_transcribe()`
|
|
||||||
pub fn token_transcribe() -> WhisperToken {
|
|
||||||
unsafe { whisper_rs_sys::whisper_token_transcribe() }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Print system information.
|
/// Print system information.
|
||||||
///
|
///
|
||||||
/// # C++ equivalent
|
/// # C++ equivalent
|
||||||
|
|
|
||||||
|
|
@ -432,6 +432,23 @@ impl WhisperContext {
|
||||||
pub fn reset_timings(&self) {
|
pub fn reset_timings(&self) {
|
||||||
unsafe { whisper_rs_sys::whisper_reset_timings(self.ctx) }
|
unsafe { whisper_rs_sys::whisper_reset_timings(self.ctx) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// task tokens
|
||||||
|
/// Get the ID of the translate task token.
|
||||||
|
///
|
||||||
|
/// # C++ equivalent
|
||||||
|
/// `whisper_token whisper_token_translate ()`
|
||||||
|
pub fn token_translate(&self) -> WhisperToken {
|
||||||
|
unsafe { whisper_rs_sys::whisper_token_translate(self.ctx) }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get the ID of the transcribe task token.
|
||||||
|
///
|
||||||
|
/// # C++ equivalent
|
||||||
|
/// `whisper_token whisper_token_transcribe()`
|
||||||
|
pub fn token_transcribe(&self) -> WhisperToken {
|
||||||
|
unsafe { whisper_rs_sys::whisper_token_transcribe(self.ctx) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for WhisperContext {
|
impl Drop for WhisperContext {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit a5defbc1b98bea0f070331ce1e8b62d947b0443d
|
Subproject commit 8e46ba80d3c1dcf532a0029f9bcdf99ce9ce7d40
|
||||||
Loading…
Add table
Add a link
Reference in a new issue