Spaces:
Running
on
A10G
Running
on
A10G
Update audio.py
Browse files
audio.py
CHANGED
@@ -33,7 +33,12 @@ def gen_audio(subtitles, tmpdir):
|
|
33 |
|
34 |
return CompositeVideoClip([clip, *txt_clips])
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
def generate_audio(subtitles, total_duration):
|
39 |
temp_audio_path = tempfile.mkdtemp()
|
|
|
33 |
|
34 |
return CompositeVideoClip([clip, *txt_clips])
|
35 |
|
36 |
+
if len(subtitles) != 0:
|
37 |
+
video_with_subtitles = add_subtitles(combined_clip, subtitles)
|
38 |
+
else:
|
39 |
+
combined_clip.write_videofile(tmpdir + '/output_with_subtitles.mp4', fps=24)
|
40 |
+
print("Generated Video with Subtitles to:", tmpdir + '/output_with_subtitles.mp4')
|
41 |
+
return tmpdir + '/output_with_subtitles.mp4'
|
42 |
|
43 |
def generate_audio(subtitles, total_duration):
|
44 |
temp_audio_path = tempfile.mkdtemp()
|