Spaces:
Running
Running
jhj0517
commited on
Commit
·
c98fbfc
1
Parent(s):
b9aca0f
Fix wrong empty words check logic
Browse files
modules/utils/subtitle_manager.py
CHANGED
@@ -172,7 +172,7 @@ class SubtitlesWriter(ResultWriter):
|
|
172 |
if len(subtitle) > 0:
|
173 |
yield subtitle
|
174 |
|
175 |
-
if len(result["segments"]) > 0 and "words" in result["segments"][0]:
|
176 |
for subtitle in iterate_subtitles():
|
177 |
subtitle_start = self.format_timestamp(subtitle[0]["start"])
|
178 |
subtitle_end = self.format_timestamp(subtitle[-1]["end"])
|
|
|
172 |
if len(subtitle) > 0:
|
173 |
yield subtitle
|
174 |
|
175 |
+
if len(result["segments"]) > 0 and "words" in result["segments"][0] and result["segments"][0]["words"]:
|
176 |
for subtitle in iterate_subtitles():
|
177 |
subtitle_start = self.format_timestamp(subtitle[0]["start"])
|
178 |
subtitle_end = self.format_timestamp(subtitle[-1]["end"])
|