Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,14 @@ language_dict = {
|
|
13 |
"Clara": "en-CA-ClaraNeural"
|
14 |
},
|
15 |
"Tigrinya": {
|
16 |
-
"Ameha (Amharic
|
17 |
-
"Mekdes (Amharic
|
18 |
}
|
19 |
}
|
20 |
|
21 |
async def text_to_speech_edge(text, language, speaker):
|
22 |
if language == "Tigrinya":
|
23 |
-
speaker = speaker.replace(" (Amharic
|
24 |
|
25 |
try:
|
26 |
voice = language_dict[language][speaker]
|
@@ -53,7 +53,7 @@ def update_speakers(language):
|
|
53 |
return gr.Dropdown(
|
54 |
choices=speakers,
|
55 |
value=speakers[0],
|
56 |
-
label=f"Select Speaker {'(Amharic
|
57 |
)
|
58 |
|
59 |
with gr.Blocks(title="Amharic, English & Tigrinya TTS", theme=gr.themes.Soft()) as demo:
|
|
|
13 |
"Clara": "en-CA-ClaraNeural"
|
14 |
},
|
15 |
"Tigrinya": {
|
16 |
+
"Ameha (Amharic)": "am-ET-AmehaNeural",
|
17 |
+
"Mekdes (Amharic)": "am-ET-MekdesNeural"
|
18 |
}
|
19 |
}
|
20 |
|
21 |
async def text_to_speech_edge(text, language, speaker):
|
22 |
if language == "Tigrinya":
|
23 |
+
speaker = speaker.replace(" (Amharic)", "")
|
24 |
|
25 |
try:
|
26 |
voice = language_dict[language][speaker]
|
|
|
53 |
return gr.Dropdown(
|
54 |
choices=speakers,
|
55 |
value=speakers[0],
|
56 |
+
label=f"Select Speaker {'(Amharic)' if language == 'Tigrinya' else ''}"
|
57 |
)
|
58 |
|
59 |
with gr.Blocks(title="Amharic, English & Tigrinya TTS", theme=gr.themes.Soft()) as demo:
|