Fix language detection with non-speech audio (#895)

This commit is contained in:
trungkienbkhn
2024-07-05 14:43:45 +07:00
committed by GitHub
parent 1195359984
commit fbcf58bf98

View File

@@ -390,7 +390,7 @@ class WhisperModel:
content_frames,
)
detected_language_info = {}
while seek < end_frames:
while seek <= end_frames:
segment = features[
:, seek : seek + self.feature_extractor.nb_max_frames
]