Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import os
|
|
| 6 |
|
| 7 |
async def get_voices():
|
| 8 |
voices = await edge_tts.list_voices()
|
| 9 |
-
voices =
|
| 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):
|