Update modules/vad/silero_vad.py
Browse files259 unmodified lines260261262263264265266267268269270271272273259 unmodified lineswords = []for word in segment["text"]:# Ensure the word start and end times are resolved to the same chunk.middle = (word.start + word.end) / 2chunk_index = ts_map.get_chunk_index(middle)word.start = ts_map.get_original_time(word.start, chunk_index)word.end = ts_map.get_original_time(word.end, chunk_index)words.append(word)segment["start"] = words[0].startsegment["end"] = words[-1].endsegment["text"] = wordselse:259 unmodified lines260261262263264265266267268269270271272273259 unmodified lineswords = []for word in segment["text"]:# Ensure the word start and end times are resolved to the same chunk.middle = (word["start"] + word["end"]) / 2chunk_index = ts_map.get_chunk_index(middle)word["start"] = ts_map.get_original_time(word.start, chunk_index)word["end"] = ts_map.get_original_time(word.end, chunk_index)words.append(word)segment["start"] = words[0]["start"]segment["end"] = words[-1]["end"]segment["text"] = wordselse:
modules/vad/silero_vad.py+5-5