add whisper_reset_timings

This commit is contained in:
0/0 2022-12-14 17:10:21 -07:00
parent aa287e2ea6
commit eda8559cc8
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B

View file

@ -367,6 +367,15 @@ impl WhisperContext {
unsafe { whisper_rs_sys::whisper_print_timings(self.ctx) }
}
/// Reset performance statistics.
///
/// # C++ equivalent
/// `void whisper_reset_timings(struct whisper_context * ctx)`
#[inline]
pub fn reset_timings(&self) {
unsafe { whisper_rs_sys::whisper_reset_timings(self.ctx) }
}
/// Run the entire model: PCM -> log mel spectrogram -> encoder -> decoder -> text
/// Uses the specified decoding strategy to obtain the text.
///