HoneyTian commited on
Commit
51b49e2
·
1 Parent(s): 6a52de7
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -74,7 +74,7 @@ def run_silero_vad(filename: str, silence_time: float = 0.3, longest_activate: f
74
  pattern = "speech starts at (.+?)s[\r\n].*?speech ends at (.+?)s"
75
 
76
  vad_timestamps = re.findall(pattern, raw_vad_result, flags=re.DOTALL)
77
- vad_timestamps = [(int(float(start) * 1000), float(end) * 1000) for start, end in vad_timestamps]
78
 
79
  vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
80
 
 
74
  pattern = "speech starts at (.+?)s[\r\n].*?speech ends at (.+?)s"
75
 
76
  vad_timestamps = re.findall(pattern, raw_vad_result, flags=re.DOTALL)
77
+ vad_timestamps = [(int(float(start) * 1000), int(float(end) * 1000)) for start, end in vad_timestamps]
78
 
79
  vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
80