Spaces:
Running
Running
Niki Zhang
commited on
tts speed update
Browse files
app.py
CHANGED
@@ -1488,7 +1488,7 @@ async def texttospeech(text, language, autoplay,gender='female'):
|
|
1488 |
try:
|
1489 |
if autoplay:
|
1490 |
voice = filtered_language_dict[language][gender]
|
1491 |
-
communicate = edge_tts.Communicate(text, voice,rate="+25%")
|
1492 |
file_path = "output.wav"
|
1493 |
await communicate.save(file_path)
|
1494 |
with open(file_path, "rb") as audio_file:
|
|
|
1488 |
try:
|
1489 |
if autoplay:
|
1490 |
voice = filtered_language_dict[language][gender]
|
1491 |
+
communicate = edge_tts.Communicate(text=text, voice=voice,rate="+25%")
|
1492 |
file_path = "output.wav"
|
1493 |
await communicate.save(file_path)
|
1494 |
with open(file_path, "rb") as audio_file:
|