Spaces:
Sleeping
Sleeping
csukuangfj
commited on
Commit
•
4826b58
1
Parent(s):
71288ec
add french models
Browse files
model.py
CHANGED
@@ -204,6 +204,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
204 |
return german_models[repo_id](repo_id, speed)
|
205 |
elif repo_id in spanish_models:
|
206 |
return spanish_models[repo_id](repo_id, speed)
|
|
|
|
|
207 |
else:
|
208 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
209 |
|
@@ -263,13 +265,22 @@ spanish_models = {
|
|
263 |
"csukuangfj/vits-piper-es_ES-davefx-medium": _get_vits_piper,
|
264 |
"csukuangfj/vits-piper-es_ES-mls_10246-low": _get_vits_piper,
|
265 |
"csukuangfj/vits-piper-es_ES-mls_9972-low": _get_vits_piper,
|
266 |
-
"csukuangfj/vits-piper-es_ES-sharvard-medium": _get_vits_piper,
|
267 |
"csukuangfj/vits-piper-es_MX-ald-medium": _get_vits_piper,
|
268 |
}
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
language_to_models = {
|
271 |
"English": list(english_models.keys()),
|
272 |
"Chinese": list(chinese_models.keys()),
|
273 |
"German": list(german_models.keys()),
|
274 |
"Spanish": list(spanish_models.keys()),
|
|
|
275 |
}
|
|
|
204 |
return german_models[repo_id](repo_id, speed)
|
205 |
elif repo_id in spanish_models:
|
206 |
return spanish_models[repo_id](repo_id, speed)
|
207 |
+
elif repo_id in french_models:
|
208 |
+
return french_models[repo_id](repo_id, speed)
|
209 |
else:
|
210 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
211 |
|
|
|
265 |
"csukuangfj/vits-piper-es_ES-davefx-medium": _get_vits_piper,
|
266 |
"csukuangfj/vits-piper-es_ES-mls_10246-low": _get_vits_piper,
|
267 |
"csukuangfj/vits-piper-es_ES-mls_9972-low": _get_vits_piper,
|
268 |
+
"csukuangfj/vits-piper-es_ES-sharvard-medium": _get_vits_piper, # 2 speakers
|
269 |
"csukuangfj/vits-piper-es_MX-ald-medium": _get_vits_piper,
|
270 |
}
|
271 |
|
272 |
+
french_models = {
|
273 |
+
"csukuangfj/vits-piper-fr_FR-gilles-low": _get_vits_piper,
|
274 |
+
"csukuangfj/vits-piper-fr_FR-mls_1840-low": _get_vits_piper,
|
275 |
+
"csukuangfj/vits-piper-fr_FR-siwis-low": _get_vits_piper,
|
276 |
+
"csukuangfj/vits-piper-fr_FR-siwis-medium": _get_vits_piper,
|
277 |
+
"csukuangfj/vits-piper-fr_FR-upmc-medium": _get_vits_piper, # 2 speakers
|
278 |
+
}
|
279 |
+
|
280 |
language_to_models = {
|
281 |
"English": list(english_models.keys()),
|
282 |
"Chinese": list(chinese_models.keys()),
|
283 |
"German": list(german_models.keys()),
|
284 |
"Spanish": list(spanish_models.keys()),
|
285 |
+
"French": list(french_models.keys()),
|
286 |
}
|