Spaces:
Sleeping
Sleeping
JerryYen
commited on
Commit
•
6fad6b2
1
Parent(s):
f1f1239
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ language_dict = tts_order_voice
|
|
10 |
async def text_to_speech_edge(text, language_code):
|
11 |
voice = language_dict[language_code]
|
12 |
communicate = edge_tts.Communicate(text, voice)
|
13 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".
|
14 |
tmp_path = tmp_file.name
|
15 |
|
16 |
await communicate.save(tmp_path)
|
|
|
10 |
async def text_to_speech_edge(text, language_code):
|
11 |
voice = language_dict[language_code]
|
12 |
communicate = edge_tts.Communicate(text, voice)
|
13 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
14 |
tmp_path = tmp_file.name
|
15 |
|
16 |
await communicate.save(tmp_path)
|