artificialguybr commited on
Commit
43edaa1
1 Parent(s): 578e8ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -57,9 +57,9 @@ def process_video(video, high_quality, target_language):
57
  try:
58
  translated_text = translator.translate(whisper_text, src=whisper_language, dest=target_language_code).text
59
  except AttributeError as e:
60
- print("Failed to translate text. Here's the error:")
61
- print(e)
62
- translated_text = "Translation failed"
63
 
64
 
65
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v1")
 
57
  try:
58
  translated_text = translator.translate(whisper_text, src=whisper_language, dest=target_language_code).text
59
  except AttributeError as e:
60
+ print("Failed to translate text. Likely an issue with token extraction in the Google Translate API.")
61
+ translated_text = "Translation failed due to API issue."
62
+
63
 
64
 
65
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v1")