From 462f6c7b138672adafea40fac7fc081710348c81 Mon Sep 17 00:00:00 2001 From: 0/0 Date: Wed, 14 Dec 2022 17:04:38 -0700 Subject: [PATCH] change return types --- src/whisper_ctx.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index cae8998..60047ea 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -194,7 +194,7 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_sample_best(struct whisper_context * ctx, bool need_timestamp)` - pub fn sample_best(&mut self) -> Result { + pub fn sample_best(&mut self) -> Result { if !self.decode_once { return Err(WhisperError::DecodeNotComplete); } @@ -210,11 +210,11 @@ impl WhisperContext { /// /// # C++ equivalent /// `whisper_token whisper_sample_timestamp(struct whisper_context * ctx)` - pub fn sample_timestamp(&mut self) -> Result { + pub fn sample_timestamp(&mut self, is_initial: bool) -> Result { if !self.decode_once { return Err(WhisperError::DecodeNotComplete); } - let ret = unsafe { whisper_rs_sys::whisper_sample_timestamp(self.ctx) }; + let ret = unsafe { whisper_rs_sys::whisper_sample_timestamp(self.ctx, is_initial) }; Ok(ret) }