change return types
This commit is contained in:
parent
8317096daa
commit
462f6c7b13
1 changed files with 3 additions and 3 deletions
|
|
@ -194,7 +194,7 @@ impl WhisperContext {
|
||||||
///
|
///
|
||||||
/// # C++ equivalent
|
/// # C++ equivalent
|
||||||
/// `whisper_token whisper_sample_best(struct whisper_context * ctx, bool need_timestamp)`
|
/// `whisper_token whisper_sample_best(struct whisper_context * ctx, bool need_timestamp)`
|
||||||
pub fn sample_best(&mut self) -> Result<WhisperToken, WhisperError> {
|
pub fn sample_best(&mut self) -> Result<WhisperTokenData, WhisperError> {
|
||||||
if !self.decode_once {
|
if !self.decode_once {
|
||||||
return Err(WhisperError::DecodeNotComplete);
|
return Err(WhisperError::DecodeNotComplete);
|
||||||
}
|
}
|
||||||
|
|
@ -210,11 +210,11 @@ impl WhisperContext {
|
||||||
///
|
///
|
||||||
/// # C++ equivalent
|
/// # C++ equivalent
|
||||||
/// `whisper_token whisper_sample_timestamp(struct whisper_context * ctx)`
|
/// `whisper_token whisper_sample_timestamp(struct whisper_context * ctx)`
|
||||||
pub fn sample_timestamp(&mut self) -> Result<WhisperToken, WhisperError> {
|
pub fn sample_timestamp(&mut self, is_initial: bool) -> Result<WhisperTokenData, WhisperError> {
|
||||||
if !self.decode_once {
|
if !self.decode_once {
|
||||||
return Err(WhisperError::DecodeNotComplete);
|
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)
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue