From c3b333665445fd63de2fcbb533d7aaff5e642b51 Mon Sep 17 00:00:00 2001 From: Tai An Date: Thu, 18 Jun 2026 09:50:37 -0700 Subject: [PATCH] fix(whisperx): use whisperx.diarize.DiarizationPipeline with token kwarg (#10389) Signed-off-by: Anai-Guo --- backend/python/whisperx/backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/python/whisperx/backend.py b/backend/python/whisperx/backend.py index 096f9ffdf..7318e10b7 100644 --- a/backend/python/whisperx/backend.py +++ b/backend/python/whisperx/backend.py @@ -79,6 +79,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): def AudioTranscription(self, request, context): import whisperx + from whisperx.diarize import DiarizationPipeline resultSegments = [] text = "" @@ -106,8 +107,8 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): # Diarize if requested and HF token is available if request.diarize and self.hf_token: if self.diarize_pipeline is None: - self.diarize_pipeline = whisperx.DiarizationPipeline( - use_auth_token=self.hf_token, + self.diarize_pipeline = DiarizationPipeline( + token=self.hf_token, device=self.device, ) diarize_segments = self.diarize_pipeline(audio)