Spaces:
Sleeping
Sleeping
Commit
•
9249790
1
Parent(s):
684c796
add Thai from mms
Browse files
app.py
CHANGED
@@ -62,6 +62,7 @@ css = """
|
|
62 |
|
63 |
examples = [
|
64 |
["Min-nan (闽南话)", "csukuangfj/vits-mms-nan", "ài piaǸ chiah ē iaN̂", 0, 1.0],
|
|
|
65 |
]
|
66 |
|
67 |
|
|
|
62 |
|
63 |
examples = [
|
64 |
["Min-nan (闽南话)", "csukuangfj/vits-mms-nan", "ài piaǸ chiah ē iaN̂", 0, 1.0],
|
65 |
+
["Thai", "csukuangfj/vits-mms-tha", "กำแพงมีหู ประตูมีตา", 0, 1.0],
|
66 |
]
|
67 |
|
68 |
|
model.py
CHANGED
@@ -344,6 +344,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
344 |
return bangla_models[repo_id](repo_id, speed)
|
345 |
elif repo_id in min_nan_models:
|
346 |
return min_nan_models[repo_id](repo_id, speed)
|
|
|
|
|
347 |
else:
|
348 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
349 |
|
@@ -632,6 +634,10 @@ min_nan_models = {
|
|
632 |
"csukuangfj/vits-mms-nan": _get_vits_mms,
|
633 |
}
|
634 |
|
|
|
|
|
|
|
|
|
635 |
|
636 |
language_to_models = {
|
637 |
"English": list(english_models.keys()),
|
@@ -673,6 +679,7 @@ language_to_models = {
|
|
673 |
"Spanish": list(spanish_models.keys()),
|
674 |
"Swahili": list(swahili_models.keys()),
|
675 |
"Swedish": list(swedish_models.keys()),
|
|
|
676 |
"Turkish": list(turkish_models.keys()),
|
677 |
"Ukrainian": list(ukrainian_models.keys()),
|
678 |
"Vietnamese": list(vietnamese_models.keys()),
|
|
|
344 |
return bangla_models[repo_id](repo_id, speed)
|
345 |
elif repo_id in min_nan_models:
|
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 |
|
|
|
634 |
"csukuangfj/vits-mms-nan": _get_vits_mms,
|
635 |
}
|
636 |
|
637 |
+
thai_models = {
|
638 |
+
"csukuangfj/vits-mms-tha": _get_vits_mms,
|
639 |
+
}
|
640 |
+
|
641 |
|
642 |
language_to_models = {
|
643 |
"English": list(english_models.keys()),
|
|
|
679 |
"Spanish": list(spanish_models.keys()),
|
680 |
"Swahili": list(swahili_models.keys()),
|
681 |
"Swedish": list(swedish_models.keys()),
|
682 |
+
"Thai": list(thai_models.keys()),
|
683 |
"Turkish": list(turkish_models.keys()),
|
684 |
"Ukrainian": list(ukrainian_models.keys()),
|
685 |
"Vietnamese": list(vietnamese_models.keys()),
|