Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -19,14 +19,14 @@ async def list_voices() -> Dict[str, Dict]:
|
|
19 |
def process_voices(voices: Dict[str, Dict]) -> Dict[str, Dict[str, str]]:
|
20 |
processed_voices = defaultdict(dict)
|
21 |
for full_name, details in voices.items():
|
22 |
-
|
23 |
-
|
|
|
24 |
return dict(processed_voices)
|
25 |
|
26 |
async def main():
|
27 |
-
st.title("
|
28 |
-
st.write("
|
29 |
-
st.write("https://github.com/PantelisDeveloping/openspeech-tts/")
|
30 |
|
31 |
# Get voices and process them
|
32 |
voices = await list_voices()
|
|
|
19 |
def process_voices(voices: Dict[str, Dict]) -> Dict[str, Dict[str, str]]:
|
20 |
processed_voices = defaultdict(dict)
|
21 |
for full_name, details in voices.items():
|
22 |
+
language = details['language']
|
23 |
+
speaker_name = full_name.split('-')[2].replace('Neural', '')
|
24 |
+
processed_voices[language][speaker_name] = full_name
|
25 |
return dict(processed_voices)
|
26 |
|
27 |
async def main():
|
28 |
+
st.title("OpenSource Text-to-Speech App")
|
29 |
+
st.write("Convert text to speech using various voices")
|
|
|
30 |
|
31 |
# Get voices and process them
|
32 |
voices = await list_voices()
|