mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
Merge pull request #1005 from tan90xx/main
chore: handle empty segments_list case in silero
This commit is contained in:
@ -59,4 +59,8 @@ class Silero(Vad):
|
|||||||
offset: Optional[float] = None,
|
offset: Optional[float] = None,
|
||||||
):
|
):
|
||||||
assert chunk_size > 0
|
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)
|
return Vad.merge_chunks(segments, chunk_size, onset, offset)
|
||||||
|
Reference in New Issue
Block a user