Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
•
20b641c
1
Parent(s):
6a19fc4
add more models
Browse files
model.py
CHANGED
@@ -265,6 +265,10 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
265 |
return spanish_models[repo_id](repo_id, speed)
|
266 |
elif repo_id in french_models:
|
267 |
return french_models[repo_id](repo_id, speed)
|
|
|
|
|
|
|
|
|
268 |
else:
|
269 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
270 |
|
@@ -360,6 +364,18 @@ french_models = {
|
|
360 |
"csukuangfj/vits-piper-fr_FR-tjiho-model3": _get_vits_piper,
|
361 |
}
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
language_to_models = {
|
364 |
"English": list(english_models.keys()),
|
365 |
"Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
|
@@ -367,4 +383,6 @@ language_to_models = {
|
|
367 |
"German": list(german_models.keys()),
|
368 |
"Spanish": list(spanish_models.keys()),
|
369 |
"French": list(french_models.keys()),
|
|
|
|
|
370 |
}
|
|
|
265 |
return spanish_models[repo_id](repo_id, speed)
|
266 |
elif repo_id in french_models:
|
267 |
return french_models[repo_id](repo_id, speed)
|
268 |
+
elif repo_id in ukrainian_models:
|
269 |
+
return ukrainian_models[repo_id](repo_id, speed)
|
270 |
+
elif repo_id in russian_models:
|
271 |
+
return russian_models[repo_id](repo_id, speed)
|
272 |
else:
|
273 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
274 |
|
|
|
364 |
"csukuangfj/vits-piper-fr_FR-tjiho-model3": _get_vits_piper,
|
365 |
}
|
366 |
|
367 |
+
ukrainian_models = {
|
368 |
+
"csukuangfj/vits-piper-uk_UA-lada-x_low": _get_vits_piper,
|
369 |
+
"csukuangfj/vits-piper-uk_UA-ukrainian_tts-medium": _get_vits_piper,
|
370 |
+
}
|
371 |
+
|
372 |
+
russian_models = {
|
373 |
+
"csukuangfj/vits-piper-ru_RU-denis-medium": _get_vits_piper,
|
374 |
+
"csukuangfj/vits-piper-ru_RU-dmitri-medium": _get_vits_piper,
|
375 |
+
"csukuangfj/vits-piper-ru_RU-irina-medium": _get_vits_piper,
|
376 |
+
"csukuangfj/vits-piper-ru_RU-ruslan-medium": _get_vits_piper,
|
377 |
+
}
|
378 |
+
|
379 |
language_to_models = {
|
380 |
"English": list(english_models.keys()),
|
381 |
"Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
|
|
|
383 |
"German": list(german_models.keys()),
|
384 |
"Spanish": list(spanish_models.keys()),
|
385 |
"French": list(french_models.keys()),
|
386 |
+
"Ukrainian": list(ukrainian_models.keys()),
|
387 |
+
"Russian": list(russian_models.keys()),
|
388 |
}
|