mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
chore: handle empty segments_list case in silero
prevent errors
This commit is contained in:
@ -59,4 +59,8 @@ class Silero(Vad):
|
||||
offset: Optional[float] = None,
|
||||
):
|
||||
assert chunk_size > 0
|
||||
if len(segments_list) == 0:
|
||||
print("No active speech found in audio")
|
||||
return []
|
||||
assert segments_list, "segments_list is empty."
|
||||
return Vad.merge_chunks(segments, chunk_size, onset, offset)
|
||||
|
Reference in New Issue
Block a user