Fix error handling for AfricanVoices until Flite installation can be resolved.
Browse files
app.py
CHANGED
|
@@ -66,7 +66,10 @@ type=['wav'])
|
|
| 66 |
finetuned_mms4 = synth_mms(tts_text, "khof312/mms-tts-spa-female")
|
| 67 |
if tts_lang=="lin":
|
| 68 |
finetuned_mms1 = synth_mms(tts_text, "khof312/mms-tts-lin-female")
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
#vc_mms
|
| 72 |
#vc_coqui
|
|
@@ -166,12 +169,14 @@ type=['wav'])
|
|
| 166 |
row2[0].write(f"Meta MMS")
|
| 167 |
row2[1].write("[khof312 - female](https://huggingface.co/khof312/mms-tts-lin-female)")
|
| 168 |
row2[2].audio(finetuned_mms1[0], sample_rate = finetuned_mms1[1])
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
-
row3[0].write(f"African voices")
|
| 172 |
-
row3[1].write("[African Voices]()")
|
| 173 |
-
row3[2].audio(finetuned_africanvoices[0], sample_rate = finetuned_africanvoices[1])
|
| 174 |
-
|
| 175 |
st.divider()
|
| 176 |
|
| 177 |
"## Voice conversion" #################################################################
|
|
|
|
| 66 |
finetuned_mms4 = synth_mms(tts_text, "khof312/mms-tts-spa-female")
|
| 67 |
if tts_lang=="lin":
|
| 68 |
finetuned_mms1 = synth_mms(tts_text, "khof312/mms-tts-lin-female")
|
| 69 |
+
try:
|
| 70 |
+
finetuned_africanvoices = synth_africanvoices(tts_text, models[tts_lang]['africanvoices'])
|
| 71 |
+
except:
|
| 72 |
+
pass
|
| 73 |
|
| 74 |
#vc_mms
|
| 75 |
#vc_coqui
|
|
|
|
| 169 |
row2[0].write(f"Meta MMS")
|
| 170 |
row2[1].write("[khof312 - female](https://huggingface.co/khof312/mms-tts-lin-female)")
|
| 171 |
row2[2].audio(finetuned_mms1[0], sample_rate = finetuned_mms1[1])
|
| 172 |
+
|
| 173 |
+
try:
|
| 174 |
+
row3[0].write(f"African voices")
|
| 175 |
+
row3[1].write("[African Voices]()")
|
| 176 |
+
row3[2].audio(finetuned_africanvoices[0], sample_rate = finetuned_africanvoices[1])
|
| 177 |
+
except:
|
| 178 |
+
pass
|
| 179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
st.divider()
|
| 181 |
|
| 182 |
"## Voice conversion" #################################################################
|