From fb3deb274546c773b355d9b1b88c2075b9089da2 Mon Sep 17 00:00:00 2001 From: makaveli10 Date: Tue, 15 Apr 2025 08:00:05 +0000 Subject: [PATCH] Remove clip_audio from faster_whisper backend Signed-off-by: makaveli10 --- whisper_live/backend/base.py | 4 +++- whisper_live/backend/openvino_backend.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/whisper_live/backend/base.py b/whisper_live/backend/base.py index 2e83bf9..7c810fb 100644 --- a/whisper_live/backend/base.py +++ b/whisper_live/backend/base.py @@ -28,6 +28,7 @@ class ServeClientBase(object): self.transcript = [] self.send_last_n_segments = 10 self.no_speech_thresh = 0.45 + self.clip_audio = False # text formatting self.pick_previous_segments = 2 @@ -60,7 +61,8 @@ class ServeClientBase(object): if self.frames_np is None: continue - self.clip_audio_if_no_valid_segment() + if self.clip_audio: + self.clip_audio_if_no_valid_segment() input_bytes, duration = self.get_audio_chunk_for_processing() if duration < 1.0: diff --git a/whisper_live/backend/openvino_backend.py b/whisper_live/backend/openvino_backend.py index dae1cfc..76f4515 100644 --- a/whisper_live/backend/openvino_backend.py +++ b/whisper_live/backend/openvino_backend.py @@ -38,6 +38,7 @@ class ServeClientOpenVINO(ServeClientBase): self.task = "transcribe" if task is None else task self.same_output_threshold = 10 self.end_time_for_same_output = None + self.clip_audio = True core = Core() available_devices = core.available_devices