From 0471f26a3368ad8a64fe133c611dfc9c9768f1f6 Mon Sep 17 00:00:00 2001 From: Yuta Hayashibe Date: Sun, 25 Sep 2022 00:34:39 +0900 Subject: [PATCH] Fix condition --- whisper_streaming/transcriber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper_streaming/transcriber.py b/whisper_streaming/transcriber.py index 5fc521d..c1114a5 100644 --- a/whisper_streaming/transcriber.py +++ b/whisper_streaming/transcriber.py @@ -290,7 +290,7 @@ class WhisperStreamingTranscriber: seek += last_timestamp_position * self.input_stride logger.debug(f"new seek={seek}, mel.shape: {mel.shape}") - if mel.shape[-1] < N_FRAMES: + if mel.shape[-1] - seek < N_FRAMES: break if mel.shape[-1] - seek <= 0: