EmoCube commited on
Commit
dbb18df
·
verified ·
1 Parent(s): 559b46d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,8 @@ import os
6
 
7
  async def get_voices():
8
  voices = await edge_tts.list_voices()
9
- return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in voices}
 
10
 
11
  async def text_to_speech(text, voice, rate, pitch):
12
  if not text.strip():
 
6
 
7
  async def get_voices():
8
  voices = await edge_tts.list_voices()
9
+ filtered_voices = [v for v in voices if v['Gender'] == 'Female' and 'Multi' in v['ShortName']]
10
+ return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in filtered_voices}
11
 
12
  async def text_to_speech(text, voice, rate, pitch):
13
  if not text.strip():