From ea7bb91a5614b222f77df72f9448207051998902 Mon Sep 17 00:00:00 2001 From: awerks Date: Thu, 17 Aug 2023 14:49:57 +0200 Subject: [PATCH] Update asr.py --- whisperx/asr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/whisperx/asr.py b/whisperx/asr.py index 8b1e5ca..bef3cd8 100644 --- a/whisperx/asr.py +++ b/whisperx/asr.py @@ -247,7 +247,7 @@ class FasterWhisperPipeline(Pipeline): return final_iterator def transcribe( - self, audio: Union[str, np.ndarray], batch_size=None, num_workers=0, language=None, task=None, print_progress = False + self, audio: Union[str, np.ndarray], batch_size=None, num_workers=0, language=None, task=None, print_progress = False, combined_progress=False ) -> TranscriptionResult: if isinstance(audio, str): audio = load_audio(audio) @@ -288,7 +288,8 @@ class FasterWhisperPipeline(Pipeline): total_segments = len(vad_segments) for idx, out in enumerate(self.__call__(data(audio, vad_segments), batch_size=batch_size, num_workers=num_workers)): if print_progress: - percent_complete = ((idx + 1) / total_segments) * 100 + base_progress = ((idx + 1) / total_segments) * 100 + percent_complete = base_progress / 2 if combined_progress else base_progress print(f"Progress: {percent_complete:.2f}%...") text = out['text'] if batch_size in [0, 1, None]: