Spaces:
Running
Running
Sarath0x8f
commited on
Update translate_speak.py
Browse files- 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 |
-
|
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
|