From 747f71da57487be6a1772e4eb014f860e5766c3a Mon Sep 17 00:00:00 2001 From: newfla Date: Mon, 3 Mar 2025 17:01:29 +0100 Subject: [PATCH] doc: added dtw-callback disclaimer --- src/whisper_params.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/whisper_params.rs b/src/whisper_params.rs index 1bb2808..607a65d 100644 --- a/src/whisper_params.rs +++ b/src/whisper_params.rs @@ -376,6 +376,7 @@ impl<'a, 'b> FullParams<'a, 'b> { /// Do not use this function unless you know what you are doing. /// * Be careful not to mutate the state of the whisper_context pointer returned in the callback. /// This could cause undefined behavior, as this violates the thread-safety guarantees of the underlying C library. + /// **Warning** Can't be used with DTW. DTW will produce inconsistent callback invocation /// /// Defaults to None. pub unsafe fn set_new_segment_callback( @@ -389,6 +390,7 @@ impl<'a, 'b> FullParams<'a, 'b> { /// /// # Safety /// See the safety notes for `set_new_segment_callback`. + /// **Warning** Can't be used with DTW. DTW will produce inconsistent callback invocation /// /// Defaults to None. pub unsafe fn set_new_segment_callback_user_data(&mut self, user_data: *mut std::ffi::c_void) { @@ -399,6 +401,7 @@ impl<'a, 'b> FullParams<'a, 'b> { /// /// Provides a limited segment_callback to ensure safety. /// See `set_new_segment_callback` if you need to use `whisper_context` and `whisper_state` + /// **Warning** Can't be used with DTW. DTW will produce inconsistent callback invocation /// /// Defaults to None. pub fn set_segment_callback_safe(&mut self, closure: O) @@ -468,6 +471,7 @@ impl<'a, 'b> FullParams<'a, 'b> { /// /// Provides a limited segment_callback to ensure safety with lossy handling of bad UTF-8 characters. /// See `set_new_segment_callback` if you need to use `whisper_context` and `whisper_state`. + /// **Warning** Can't be used with DTW. DTW will produce inconsistent callback invocation /// /// Defaults to None. pub fn set_segment_callback_safe_lossy(&mut self, closure: O)