pantelnm commited on
Commit
ae215a5
1 Parent(s): 4fbaed0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- lang, speaker_name = full_name.split('-')[:2]
23
- processed_voices[lang][speaker_name] = full_name
 
24
  return dict(processed_voices)
25
 
26
  async def main():
27
- st.title("OpenSpeech-TTS")
28
- st.write("An API to generate high quality speech with minimal hardware fast and efficiently.")
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()