Spaces:
Running
on
A10G
Running
on
A10G
Update audio.py
Browse files
audio.py
CHANGED
@@ -112,9 +112,18 @@ def merge_subtitles(subtitles):
|
|
112 |
duration = current_end - current_start
|
113 |
break
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
merged_subtitles.append([[current_start, current_end], current_content])
|
119 |
|
120 |
return merged_subtitles
|
|
|
112 |
duration = current_end - current_start
|
113 |
break
|
114 |
|
115 |
+
all_elem = list(set(current_content.replace("η΄°η―", "").split('γ')))
|
116 |
+
if "ε·¦ζ" in all_elem and "ε³ζ" in all_elem:
|
117 |
+
all_elem.remove("ε·¦ζ")
|
118 |
+
all_elem.remove("ε³ζ")
|
119 |
+
all_elem.append("ιζ")
|
120 |
+
if "ε·¦θ" in all_elem and "ε³θ" in all_elem:
|
121 |
+
all_elem.remove("ε·¦θ")
|
122 |
+
all_elem.remove("ε³θ")
|
123 |
+
all_elem.append("ιθ")
|
124 |
+
current_content = 'ι裑θ«ζ³¨ζ' + 'γ'.join(all_elem)
|
125 |
+
# current_content = current_content.replace("ε·¦ζγε³ζ", "ιζ").replace("ε³ζγε·¦ζ", "ιζ")
|
126 |
+
# current_content = current_content.replace("ε·¦θγε³θ", "ιθ").replace("ε³θγε·¦θ", "ιθ")
|
127 |
merged_subtitles.append([[current_start, current_end], current_content])
|
128 |
|
129 |
return merged_subtitles
|