From fbcf58bf984a309edab9d21e23bca872e1d5fe61 Mon Sep 17 00:00:00 2001 From: trungkienbkhn Date: Fri, 5 Jul 2024 14:43:45 +0700 Subject: [PATCH] Fix language detection with non-speech audio (#895) --- faster_whisper/transcribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faster_whisper/transcribe.py b/faster_whisper/transcribe.py index 382a366d..6b95f016 100644 --- a/faster_whisper/transcribe.py +++ b/faster_whisper/transcribe.py @@ -390,7 +390,7 @@ def transcribe( content_frames, ) detected_language_info = {} - while seek < end_frames: + while seek <= end_frames: segment = features[ :, seek : seek + self.feature_extractor.nb_max_frames ]