Generate bindings + rustfmt

This commit is contained in:
arizhih 2024-05-16 15:29:38 +02:00
parent f6826200fc
commit dcfcbced18
2 changed files with 1673 additions and 252 deletions

View file

@ -491,7 +491,7 @@ pub struct WhisperContextParameters {
/// Memory size for DTW /// Memory size for DTW
/// ///
/// **Warning**: Might be removed in next version of whisper.cpp /// **Warning**: Might be removed in next version of whisper.cpp
pub dtw_mem_size : usize pub dtw_mem_size: usize,
} }
#[allow(clippy::derivable_impls)] // this impl cannot be derived #[allow(clippy::derivable_impls)] // this impl cannot be derived
@ -504,8 +504,11 @@ impl Default for WhisperContextParameters {
dtw_token_timestamps: false, dtw_token_timestamps: false,
dtw_aheads_preset: whisper_rs_sys::whisper_alignment_heads_preset_WHISPER_AHEADS_NONE, dtw_aheads_preset: whisper_rs_sys::whisper_alignment_heads_preset_WHISPER_AHEADS_NONE,
dtw_n_top: -1, dtw_n_top: -1,
dtw_aheads : whisper_rs_sys::whisper_aheads { n_heads: 0, heads: std::ptr::null() }, dtw_aheads: whisper_rs_sys::whisper_aheads {
dtw_mem_size : 1024 * 1024 * 128 n_heads: 0,
heads: std::ptr::null(),
},
dtw_mem_size: 1024 * 1024 * 128,
} }
} }
} }
@ -529,7 +532,10 @@ impl WhisperContextParameters {
self.dtw_token_timestamps = dtw_token_timestamps; self.dtw_token_timestamps = dtw_token_timestamps;
self self
} }
pub fn dtw_aheads_preset(&mut self, dtw_aheads_preset: whisper_rs_sys::whisper_alignment_heads_preset) -> &mut Self { pub fn dtw_aheads_preset(
&mut self,
dtw_aheads_preset: whisper_rs_sys::whisper_alignment_heads_preset,
) -> &mut Self {
self.dtw_aheads_preset = dtw_aheads_preset; self.dtw_aheads_preset = dtw_aheads_preset;
self self
} }

File diff suppressed because it is too large Load diff