Update app.py
Browse files
app.py
CHANGED
@@ -445,13 +445,11 @@ def add_transcript_voiceover(video_path, translated_json, output_path, add_voice
|
|
445 |
print("π Loading XTTS model...")
|
446 |
tts_model = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2")
|
447 |
print("β
XTTS model loaded successfully.")
|
448 |
-
return "XTTS model loaded successfully."
|
449 |
except Exception as e:
|
450 |
print("β Error loading XTTS model:")
|
451 |
traceback.print_exc()
|
452 |
return f"Error loading XTTS model: {e}"
|
453 |
-
|
454 |
-
return "XTTS model is already loaded."
|
455 |
|
456 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
457 |
futures = [executor.submit(process_entry, tts_model, entry, i, video.w, video.h, add_voiceover, target_language, font_path, speaker_sample_paths)
|
|
|
445 |
print("π Loading XTTS model...")
|
446 |
tts_model = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2")
|
447 |
print("β
XTTS model loaded successfully.")
|
|
|
448 |
except Exception as e:
|
449 |
print("β Error loading XTTS model:")
|
450 |
traceback.print_exc()
|
451 |
return f"Error loading XTTS model: {e}"
|
452 |
+
## Need to implmenet backup option.
|
|
|
453 |
|
454 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
455 |
futures = [executor.submit(process_entry, tts_model, entry, i, video.w, video.h, add_voiceover, target_language, font_path, speaker_sample_paths)
|