kevinwang676 commited on
Commit
3d852d0
·
1 Parent(s): d484388

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -282,7 +282,8 @@ def print(text):
282
  # TTS
283
 
284
  async def text_to_speech_edge(text, voice):
285
- communicate = edge_tts.Communicate(text, voice)
 
286
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as tmp_file:
287
  tmp_path = tmp_file.name
288
 
 
282
  # TTS
283
 
284
  async def text_to_speech_edge(text, voice):
285
+
286
+ communicate = edge_tts.Communicate(text, "-".join(voice.split('-')[:-1]))
287
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as tmp_file:
288
  tmp_path = tmp_file.name
289