From eda8559cc88d3aba9fe1efd703db6120aa7a05f7 Mon Sep 17 00:00:00 2001 From: 0/0 Date: Wed, 14 Dec 2022 17:10:21 -0700 Subject: [PATCH] add whisper_reset_timings --- src/whisper_ctx.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index 3512ea1..00727a6 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -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. ///