Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a9e060571a
3 changed files with 33 additions and 0 deletions
|
|
@ -518,6 +518,20 @@ impl WhisperContext {
|
||||||
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 WhisperContext {
|
impl Drop for WhisperContext {
|
||||||
|
|
|
||||||
|
|
@ -576,4 +576,22 @@ impl<'a> WhisperState<'a> {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 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_from_state(struct whisper_state * state, 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_from_state(
|
||||||
|
self.ptr, i_segment,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ fn main() {
|
||||||
println!("cargo:rustc-link-lib=cublas");
|
println!("cargo:rustc-link-lib=cublas");
|
||||||
println!("cargo:rustc-link-lib=cudart");
|
println!("cargo:rustc-link-lib=cudart");
|
||||||
println!("cargo:rustc-link-lib=cublasLt");
|
println!("cargo:rustc-link-lib=cublasLt");
|
||||||
|
println!("cargo:rustc-link-lib=cuda");
|
||||||
cfg_if::cfg_if! {
|
cfg_if::cfg_if! {
|
||||||
if #[cfg(target_os = "windows")] {
|
if #[cfg(target_os = "windows")] {
|
||||||
let cuda_path = PathBuf::from(env::var("CUDA_PATH").unwrap()).join("lib/x64");
|
let cuda_path = PathBuf::from(env::var("CUDA_PATH").unwrap()).join("lib/x64");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue