Skip to content

Commit

Permalink
Merge pull request #1005 from tan90xx/main
Browse files Browse the repository at this point in the history
chore: handle empty segments_list case in silero
  • Loading branch information
m-bain authored Jan 19, 2025
2 parents 355f8e0 + de0d8fe commit 2117909
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions whisperx/vads/silero.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ def merge_chunks(segments,
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)

0 comments on commit 2117909

Please sign in to comment.