Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -216,13 +216,7 @@ def generate_video(
|
|
216 |
for line in linelevel_subs:
|
217 |
# ─ Static full‑line text
|
218 |
txt = TextClip(
|
219 |
-
line["word"]
|
220 |
-
fontsize=fs,
|
221 |
-
color="white",
|
222 |
-
method='label',
|
223 |
-
stroke_color="black",
|
224 |
-
stroke_width=1
|
225 |
-
)
|
226 |
x0 = (fw - txt.w) / 2
|
227 |
static = (
|
228 |
txt
|
@@ -236,13 +230,7 @@ def generate_video(
|
|
236 |
cursor = x0
|
237 |
for wd in line["textcontents"]:
|
238 |
wc = TextClip(
|
239 |
-
wd["word"]
|
240 |
-
fontsize=fs,
|
241 |
-
color="yellow",
|
242 |
-
method='label',
|
243 |
-
stroke_color="black",
|
244 |
-
stroke_width=1
|
245 |
-
)
|
246 |
hl = (
|
247 |
wc
|
248 |
.set_start(wd["start"])
|
@@ -252,7 +240,7 @@ def generate_video(
|
|
252 |
all_clips.append(hl)
|
253 |
|
254 |
# advance cursor by measuring a space after the word
|
255 |
-
dummy = TextClip(wd["word"] + " "
|
256 |
cursor += dummy.w
|
257 |
|
258 |
# 8️⃣ Composite all clips and export
|
|
|
216 |
for line in linelevel_subs:
|
217 |
# ─ Static full‑line text
|
218 |
txt = TextClip(
|
219 |
+
line["word"])
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
x0 = (fw - txt.w) / 2
|
221 |
static = (
|
222 |
txt
|
|
|
230 |
cursor = x0
|
231 |
for wd in line["textcontents"]:
|
232 |
wc = TextClip(
|
233 |
+
wd["word"])
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
hl = (
|
235 |
wc
|
236 |
.set_start(wd["start"])
|
|
|
240 |
all_clips.append(hl)
|
241 |
|
242 |
# advance cursor by measuring a space after the word
|
243 |
+
dummy = TextClip(wd["word"] + " ")
|
244 |
cursor += dummy.w
|
245 |
|
246 |
# 8️⃣ Composite all clips and export
|