From 4e9f9515511048a7ab2bac5e15318cc4530eb0f0 Mon Sep 17 00:00:00 2001 From: Quentin Fuxa Date: Thu, 23 Oct 2025 11:20:00 +0200 Subject: [PATCH] correct silences handling when language not auto --- whisperlivekit/simul_whisper/backend.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/whisperlivekit/simul_whisper/backend.py b/whisperlivekit/simul_whisper/backend.py index 8830db7..760ecfd 100644 --- a/whisperlivekit/simul_whisper/backend.py +++ b/whisperlivekit/simul_whisper/backend.py @@ -111,7 +111,11 @@ class SimulStreamingOnlineProcessor: """ try: timestamped_words = self.model.infer(is_last=is_last) - if self.model.cfg.language == "auto" and timestamped_words and timestamped_words[0].detected_language == None: + + if not timestamped_words: + return [], self.end + + if self.model.cfg.language == "auto" and timestamped_words[0].detected_language is None: self.buffer.extend(timestamped_words) return [], self.end