alonsosilva
commited on
Commit
•
2fc66cc
1
Parent(s):
c50c40d
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,9 @@ def tts(text: str, language: str):
|
|
54 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
55 |
print(fp.name)
|
56 |
tts = gTTS(text, lang=language)
|
57 |
-
tts.save(fp)
|
58 |
-
|
|
|
59 |
|
60 |
def generate_audio(translated_text):
|
61 |
try:
|
|
|
54 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
55 |
print(fp.name)
|
56 |
tts = gTTS(text, lang=language)
|
57 |
+
# tts.save(fp)
|
58 |
+
tts.save("./hello.mp3")
|
59 |
+
return "./hello.mp3"
|
60 |
|
61 |
def generate_audio(translated_text):
|
62 |
try:
|