Update app.py
Browse files
app.py
CHANGED
@@ -324,7 +324,8 @@ def process_entry(entry, i, video_width, video_height, add_voiceover, target_lan
|
|
324 |
if add_voiceover:
|
325 |
segment_audio_path = f"segment_{i}_voiceover.wav"
|
326 |
desired_duration = entry["end"] - entry["start"]
|
327 |
-
|
|
|
328 |
generate_voiceover_clone([entry], desired_duration, target_language, speaker_wav_path, segment_audio_path):
|
329 |
|
330 |
audio_clip = AudioFileClip(segment_audio_path)
|
|
|
324 |
if add_voiceover:
|
325 |
segment_audio_path = f"segment_{i}_voiceover.wav"
|
326 |
desired_duration = entry["end"] - entry["start"]
|
327 |
+
speaker_id = entry["speaker"] # Extract the speaker ID
|
328 |
+
speaker_wav_path = f"speaker_{speaker_id}_sample.wav" # pass the intermediate value to prevent from breaking.
|
329 |
generate_voiceover_clone([entry], desired_duration, target_language, speaker_wav_path, segment_audio_path):
|
330 |
|
331 |
audio_clip = AudioFileClip(segment_audio_path)
|