Spaces:
Sleeping
Sleeping
update
Browse files
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 |
|