From 8bf0602e2490bc6cfe9b364cf8c7c83f33ae0b25 Mon Sep 17 00:00:00 2001 From: Niko Date: Wed, 10 Sep 2025 19:15:58 -0700 Subject: [PATCH] Implement Send + Sync for WhisperVadContext All data stored internally on this struct appears to be similar to what's stored on WhisperContext so this should also be threadsafe. --- src/whisper_vad.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/whisper_vad.rs b/src/whisper_vad.rs index 58a8122..5bbab29 100644 --- a/src/whisper_vad.rs +++ b/src/whisper_vad.rs @@ -141,6 +141,8 @@ impl WhisperVadContextParams { pub struct WhisperVadContext { ptr: *mut whisper_vad_context, } +unsafe impl Send for WhisperVadContext {} +unsafe impl Sync for WhisperVadContext {} impl WhisperVadContext { pub fn new(model_path: &str, params: WhisperVadContextParams) -> Result {