Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
•
7394fa7
1
Parent(s):
05c8449
add Persian
Browse files
model.py
CHANGED
@@ -346,6 +346,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
346 |
return min_nan_models[repo_id](repo_id, speed)
|
347 |
elif repo_id in thai_models:
|
348 |
return thai_models[repo_id](repo_id, speed)
|
|
|
|
|
349 |
else:
|
350 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
351 |
|
@@ -638,6 +640,10 @@ thai_models = {
|
|
638 |
"csukuangfj/vits-mms-tha": _get_vits_mms,
|
639 |
}
|
640 |
|
|
|
|
|
|
|
|
|
641 |
|
642 |
language_to_models = {
|
643 |
"English": list(english_models.keys()),
|
@@ -669,6 +675,7 @@ language_to_models = {
|
|
669 |
"Maltese": list(maltese_models.keys()),
|
670 |
"Nepali": list(nepali_models.keys()),
|
671 |
"Norwegian": list(norwegian_models.keys()),
|
|
|
672 |
"Polish": list(polish_models.keys()),
|
673 |
"Portuguese": list(portuguese_models.keys()),
|
674 |
"Romanian": list(romanian_models.keys()),
|
|
|
346 |
return min_nan_models[repo_id](repo_id, speed)
|
347 |
elif repo_id in thai_models:
|
348 |
return thai_models[repo_id](repo_id, speed)
|
349 |
+
elif repo_id in persian_models:
|
350 |
+
return persian_models[repo_id](repo_id, speed)
|
351 |
else:
|
352 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
353 |
|
|
|
640 |
"csukuangfj/vits-mms-tha": _get_vits_mms,
|
641 |
}
|
642 |
|
643 |
+
persian_models = {
|
644 |
+
"csukuangfj/vits-piper-fa-haaniye_low": _get_vits_piper,
|
645 |
+
}
|
646 |
+
|
647 |
|
648 |
language_to_models = {
|
649 |
"English": list(english_models.keys()),
|
|
|
675 |
"Maltese": list(maltese_models.keys()),
|
676 |
"Nepali": list(nepali_models.keys()),
|
677 |
"Norwegian": list(norwegian_models.keys()),
|
678 |
+
"Persian": list(persian_models.keys()),
|
679 |
"Polish": list(polish_models.keys()),
|
680 |
"Portuguese": list(portuguese_models.keys()),
|
681 |
"Romanian": list(romanian_models.keys()),
|