Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import edge_tts
|
|
3 |
import gradio as gr
|
4 |
import asyncio
|
5 |
|
6 |
-
# Updated language dictionary with clear voice labeling
|
7 |
language_dict = {
|
8 |
"Amharic": {
|
9 |
"Ameha": "am-ET-AmehaNeural",
|
@@ -20,7 +19,6 @@ language_dict = {
|
|
20 |
}
|
21 |
|
22 |
async def text_to_speech_edge(text, language, speaker):
|
23 |
-
# Clean speaker name if it's a Tigrinya selection
|
24 |
if language == "Tigrinya":
|
25 |
speaker = speaker.replace(" (Amharic Voice)", "")
|
26 |
|
@@ -119,7 +117,7 @@ with gr.Blocks(title="Amharic, English & Tigrinya TTS", theme=gr.themes.Soft())
|
|
119 |
|
120 |
# Initialize speakers dropdown
|
121 |
demo.load(
|
122 |
-
fn=lambda: gr.
|
123 |
outputs=speaker
|
124 |
)
|
125 |
|
|
|
3 |
import gradio as gr
|
4 |
import asyncio
|
5 |
|
|
|
6 |
language_dict = {
|
7 |
"Amharic": {
|
8 |
"Ameha": "am-ET-AmehaNeural",
|
|
|
19 |
}
|
20 |
|
21 |
async def text_to_speech_edge(text, language, speaker):
|
|
|
22 |
if language == "Tigrinya":
|
23 |
speaker = speaker.replace(" (Amharic Voice)", "")
|
24 |
|
|
|
117 |
|
118 |
# Initialize speakers dropdown
|
119 |
demo.load(
|
120 |
+
fn=lambda: gr.update(choices=list(language_dict["Amharic"].keys())),
|
121 |
outputs=speaker
|
122 |
)
|
123 |
|