fix: let context stateless, remove whisper_full_get_segment_speaker_turn_next from context, better to use the same fn in state
This commit is contained in:
parent
e4f8910b1b
commit
23d16f2858
2 changed files with 0 additions and 28 deletions
|
|
@ -499,20 +499,6 @@ impl WhisperInnerContext {
|
||||||
pub fn token_transcribe(&self) -> WhisperToken {
|
pub fn token_transcribe(&self) -> WhisperToken {
|
||||||
unsafe { whisper_rs_sys::whisper_token_transcribe(self.ctx) }
|
unsafe { whisper_rs_sys::whisper_token_transcribe(self.ctx) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get whether the next segment is predicted as a speaker turn
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
/// * i_segment: Segment index.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
/// bool
|
|
||||||
///
|
|
||||||
/// # C++ equivalent
|
|
||||||
/// `bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment)`
|
|
||||||
pub fn full_get_segment_speaker_turn_next(&mut self, i_segment: c_int) -> bool {
|
|
||||||
unsafe { whisper_rs_sys::whisper_full_get_segment_speaker_turn_next(self.ctx, i_segment) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for WhisperInnerContext {
|
impl Drop for WhisperInnerContext {
|
||||||
|
|
|
||||||
|
|
@ -438,20 +438,6 @@ impl WhisperContext {
|
||||||
self.ctx.token_transcribe()
|
self.ctx.token_transcribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get whether the next segment is predicted as a speaker turn
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
/// * i_segment: Segment index.
|
|
||||||
///
|
|
||||||
/// # Returns
|
|
||||||
/// bool
|
|
||||||
///
|
|
||||||
/// # C++ equivalent
|
|
||||||
/// `bool whisper_full_get_segment_speaker_turn_next(struct whisper_context * ctx, int i_segment)`
|
|
||||||
pub fn full_get_segment_speaker_turn_next(&mut self, i_segment: c_int) -> bool {
|
|
||||||
self.ctx.full_get_segment_speaker_turn_next(i_segment)
|
|
||||||
}
|
|
||||||
|
|
||||||
// we don't implement `whisper_init()` here since i have zero clue what `whisper_model_loader` does
|
// we don't implement `whisper_init()` here since i have zero clue what `whisper_model_loader` does
|
||||||
|
|
||||||
/// Create a new state object, ready for use.
|
/// Create a new state object, ready for use.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue