djanssen79 commited on
Commit
75ff20e
·
verified ·
1 Parent(s): 296fb32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ import os
6
 
7
  async def get_voices():
8
  voices = await edge_tts.list_voices()
9
- voices = {key: value for key, value in voices.items() if "de-DE" in key or "de-DE" in value}
10
  return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in voices}
11
 
12
  async def text_to_speech(text, voice, rate, pitch):
 
6
 
7
  async def get_voices():
8
  voices = await edge_tts.list_voices()
9
+ voices = [voice for voice in voices if voice.get("Locale") == "de-DE"]
10
  return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in voices}
11
 
12
  async def text_to_speech(text, voice, rate, pitch):