From 851fca36d7ea525289ed02a305e47ae9b76936e5 Mon Sep 17 00:00:00 2001 From: Zero Date: Mon, 28 Aug 2023 17:04:08 -0600 Subject: [PATCH] Add new nosp token --- src/whisper_ctx.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index 29f3685..a144a96 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -405,6 +405,15 @@ impl WhisperContext { unsafe { whisper_rs_sys::whisper_token_sot(self.ctx) } } + /// Get the ID of the solm token. + /// + /// # C++ equivalent + /// `whisper_token whisper_token_solm(struct whisper_context * ctx)` + #[inline] + pub fn token_solm(&self) -> WhisperToken { + unsafe { whisper_rs_sys::whisper_token_solm(self.ctx) } + } + /// Get the ID of the prev token. /// /// # C++ equivalent @@ -414,13 +423,13 @@ impl WhisperContext { unsafe { whisper_rs_sys::whisper_token_prev(self.ctx) } } - /// Get the ID of the solm token. + /// Get the ID of the nosp token. /// /// # C++ equivalent - /// `whisper_token whisper_token_solm(struct whisper_context * ctx)` + /// `whisper_token whisper_token_nosp(struct whisper_context * ctx)` #[inline] - pub fn token_solm(&self) -> WhisperToken { - unsafe { whisper_rs_sys::whisper_token_solm(self.ctx) } + pub fn token_nosp(&self) -> WhisperToken { + unsafe { whisper_rs_sys::whisper_token_nosp(self.ctx) } } /// Get the ID of the not token.