From 9ca4ac71c6a23c4a95b625ec32d474cb415e6264 Mon Sep 17 00:00:00 2001 From: jafri Date: Mon, 24 Oct 2022 23:58:43 -0600 Subject: [PATCH 1/2] Running latest --- src/whisper_ctx.rs | 7 +++---- src/whisper_params.rs | 8 ++++---- sys/src/bindings.rs | 2 +- sys/whisper.cpp | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index 7c3ee96a..9697020c 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -187,18 +187,17 @@ impl WhisperContext { /// Make sure to call [WhisperContext::decode] first. /// /// # Arguments - /// * needs_timestamp /// /// # Returns /// Ok(WhisperToken) on success, Err(WhisperError) on failure. /// /// # C++ equivalent - /// `whisper_token whisper_sample_best(struct whisper_context * ctx, bool need_timestamp)` - pub fn sample_best(&mut self, needs_timestamp: bool) -> Result { + /// `whisper_token whisper_sample_best(struct whisper_context * ctx)` + pub fn sample_best(&mut self) -> Result { if !self.decode_once { return Err(WhisperError::DecodeNotComplete); } - let ret = unsafe { whisper_rs_sys::whisper_sample_best(self.ctx, needs_timestamp) }; + let ret = unsafe { whisper_rs_sys::whisper_sample_best(self.ctx) }; Ok(ret) } diff --git a/src/whisper_params.rs b/src/whisper_params.rs index 7d36c785..8d4fcf07 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -30,16 +30,16 @@ impl<'a> FullParams<'a> { match decode_strategy { DecodeStrategy::Greedy { n_past } => { - fp.__bindgen_anon_1.greedy.n_past = n_past; + // fp.__bindgen_anon_1.greedy.n_past = n_past; } DecodeStrategy::BeamSearch { n_past, beam_width, n_best, } => { - fp.__bindgen_anon_1.beam_search.n_past = n_past; - fp.__bindgen_anon_1.beam_search.beam_width = beam_width; - fp.__bindgen_anon_1.beam_search.n_best = n_best; + // fp.__bindgen_anon_1.beam_search.n_past = n_past; + // fp.__bindgen_anon_1.beam_search.beam_width = beam_width; + // fp.__bindgen_anon_1.beam_search.n_best = n_best; } } diff --git a/sys/src/bindings.rs b/sys/src/bindings.rs index 449b3aa7..6554b630 100644 --- a/sys/src/bindings.rs +++ b/sys/src/bindings.rs @@ -71,7 +71,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn whisper_sample_best(ctx: *mut whisper_context, need_timestamp: bool) -> whisper_token; + pub fn whisper_sample_best(ctx: *mut whisper_context) -> whisper_token; } extern "C" { pub fn whisper_sample_timestamp(ctx: *mut whisper_context) -> whisper_token; diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0ad085f5..d4f94ce4 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0ad085f5e88576034adc871600da296ff8016803 +Subproject commit d4f94ce427a1e7af3c27a2475ec3ae22a99e0573 From 01e0159c1f45b33e354bed3b8d34c985c6217f5a Mon Sep 17 00:00:00 2001 From: jafri Date: Tue, 25 Oct 2022 00:05:21 -0600 Subject: [PATCH 2/2] bump submodule --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index d4f94ce4..4c68f4ca 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit d4f94ce427a1e7af3c27a2475ec3ae22a99e0573 +Subproject commit 4c68f4cac00ee693106d8501d4f5fb670fe0294e