LAP-DEV commited on
Commit
410c702
·
verified ·
1 Parent(s): b551526

Update modules/vad/silero_vad.py

Browse files
Files changed (1) hide show
  1. modules/vad/silero_vad.py +2 -6
modules/vad/silero_vad.py CHANGED
@@ -250,13 +250,9 @@ class SileroVAD:
250
  ts_map = SpeechTimestampsMap(speech_chunks, sampling_rate)
251
 
252
  for segment in segments:
253
- segment["start"] = ts_map.get_original_time(segment["start"])
254
- segment["end"] = ts_map.get_original_time(segment["end"])
255
-
256
- for segment in segments:
257
- if segment.words:
258
  words = []
259
- for word in segment.words:
260
  # Ensure the word start and end times are resolved to the same chunk.
261
  middle = (word.start + word.end) / 2
262
  chunk_index = ts_map.get_chunk_index(middle)
 
250
  ts_map = SpeechTimestampsMap(speech_chunks, sampling_rate)
251
 
252
  for segment in segments:
253
+ if segment["words"]:
 
 
 
 
254
  words = []
255
+ for word in segment["words"]:
256
  # Ensure the word start and end times are resolved to the same chunk.
257
  middle = (word.start + word.end) / 2
258
  chunk_index = ts_map.get_chunk_index(middle)