You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The transcribe method fails with a ValueError (max() arg is an empty sequence) when processing audio files with no speech, especially after VAD filtering. This issue occurs during language detection when no segments remain after filtering.
Steps to Reproduce
Use an audio file with no discernible speech or where VAD filters remove all speech.
Call transcribe with vad_filter=True.
Observe the following error:
ValueError: max() arg is an empty sequence
Expected Behavior
The method should return a transcription object with empty or None fields instead of raising an error.
Suggested Fix
Add a check after VAD filtering to handle empty audio gracefully and return a formatted but empty result.
Error Traceback
File "/opt/src/audio/transcript_extractor.py", line 280, in _transcribe
transcription_segments, transcription_info = model.transcribe(
File "/usr/local/lib/python3.10/dist-packages/faster_whisper/transcribe.py", line 419, in transcribe
language = max(…
ValueError: max() arg is an empty sequence
The text was updated successfully, but these errors were encountered:
Description
The
transcribe
method fails with aValueError
(max() arg is an empty sequence
) when processing audio files with no speech, especially after VAD filtering. This issue occurs during language detection when no segments remain after filtering.Steps to Reproduce
transcribe
withvad_filter=True
.Expected Behavior
The method should return a transcription object with empty or None fields instead of raising an error.
Environment
Faster-Whisper Version: 1.0.3
Python Version: 3.10
OS: Ubuntu 22.04
GPU
Suggested Fix
Add a check after VAD filtering to handle empty audio gracefully and return a formatted but empty result.
Error Traceback
File "/opt/src/audio/transcript_extractor.py", line 280, in _transcribe
transcription_segments, transcription_info = model.transcribe(
File "/usr/local/lib/python3.10/dist-packages/faster_whisper/transcribe.py", line 419, in transcribe
language = max(…
ValueError: max() arg is an empty sequence
The text was updated successfully, but these errors were encountered: