Sarath0x8f commited on
Commit
85e9be6
·
verified ·
1 Parent(s): 7ab344f

Update translate_speak.py

Browse files
Files changed (1) hide show
  1. translate_speak.py +3 -3
translate_speak.py CHANGED
@@ -55,9 +55,9 @@ def translate_txt(lang, text):
55
  translator = GoogleTranslator(source="en", target=lang)
56
  translated_text = translator.translate(text)
57
 
58
- with open("Request.txt", 'a', encoding="utf-8") as f:
59
- f.write(f"{datetime.datetime.now()}: {text}->{lang}->{translated_text}\n")
60
-
61
  audio_path = audio_streaming(translated_text, lang=get_lang(lang), to=2)
62
 
63
  return translated_text, audio_path
 
55
  translator = GoogleTranslator(source="en", target=lang)
56
  translated_text = translator.translate(text)
57
 
58
+ # with open("Request.txt", 'a', encoding="utf-8") as f:
59
+ # f.write(f"{datetime.datetime.now()}: {text}->{lang}->{translated_text}\n")
60
+ print(f"\n{datetime.datetime.now()}: {text}->{lang}->{translated_text}\n")
61
  audio_path = audio_streaming(translated_text, lang=get_lang(lang), to=2)
62
 
63
  return translated_text, audio_path