Merge pull request #1006 from tan90xx/main

chore: fix variable naming inconsistency from `segments` to `segments_list`
This commit is contained in:
Max Bain
2025-01-20 14:05:34 +00:00
committed by GitHub

View File

@ -53,7 +53,7 @@ class Silero(Vad):
return audio return audio
@staticmethod @staticmethod
def merge_chunks(segments, def merge_chunks(segments_list,
chunk_size, chunk_size,
onset: float = 0.5, onset: float = 0.5,
offset: Optional[float] = None, offset: Optional[float] = None,
@ -63,4 +63,4 @@ class Silero(Vad):
print("No active speech found in audio") print("No active speech found in audio")
return [] return []
assert segments_list, "segments_list is empty." assert segments_list, "segments_list is empty."
return Vad.merge_chunks(segments, chunk_size, onset, offset) return Vad.merge_chunks(segments_list, chunk_size, onset, offset)