qqwjq1981 commited on
Commit
7ec72ae
·
verified ·
1 Parent(s): e301d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ import random
7
  import moviepy
8
  from transformers import pipeline
9
  from transformers.pipelines.audio_utils import ffmpeg_read
10
- from moviepy.editor import (
11
  VideoFileClip,
12
  TextClip,
13
  CompositeVideoClip,
@@ -313,12 +313,12 @@ def process_entry(entry, i, video_width, video_height, add_voiceover, target_lan
313
 
314
  # Create text clip for subtitles
315
  txt_clip = TextClip(
316
- txt=entry["translated"],
317
  font="./NotoSansSC-Regular.ttf",
318
  color='yellow',
319
  stroke_color='black',
320
  stroke_width=2,
321
- fontsize=int(video_height // 20),
322
  ).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.8)
323
 
324
  audio_segment = None
 
7
  import moviepy
8
  from transformers import pipeline
9
  from transformers.pipelines.audio_utils import ffmpeg_read
10
+ from moviepy import (
11
  VideoFileClip,
12
  TextClip,
13
  CompositeVideoClip,
 
313
 
314
  # Create text clip for subtitles
315
  txt_clip = TextClip(
316
+ text=entry["translated"],
317
  font="./NotoSansSC-Regular.ttf",
318
  color='yellow',
319
  stroke_color='black',
320
  stroke_width=2,
321
+ font_size=int(video_height // 20),
322
  ).with_start(entry["start"]).with_duration(entry["end"] - entry["start"]).with_position(('bottom')).with_opacity(0.8)
323
 
324
  audio_segment = None