Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
•
9c1cd2f
1
Parent(s):
dbe40d6
add spanish
Browse files
model.py
CHANGED
@@ -202,6 +202,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
202 |
return english_models[repo_id](repo_id, speed)
|
203 |
elif repo_id in german_models:
|
204 |
return german_models[repo_id](repo_id, speed)
|
|
|
|
|
205 |
else:
|
206 |
raise ValueError(f"Unsupported repo_id: {repo_id}")
|
207 |
|
@@ -256,9 +258,13 @@ german_models = {
|
|
256 |
"csukuangfj/vits-piper-de_DE-thorsten_emotional-medium": _get_vits_piper, # 8 speakers
|
257 |
}
|
258 |
|
|
|
|
|
|
|
259 |
|
260 |
language_to_models = {
|
261 |
"English": list(english_models.keys()),
|
262 |
"Chinese": list(chinese_models.keys()),
|
263 |
"German": list(german_models.keys()),
|
|
|
264 |
}
|
|
|
202 |
return english_models[repo_id](repo_id, speed)
|
203 |
elif repo_id in german_models:
|
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 |
|
|
|
258 |
"csukuangfj/vits-piper-de_DE-thorsten_emotional-medium": _get_vits_piper, # 8 speakers
|
259 |
}
|
260 |
|
261 |
+
spanish_models = {
|
262 |
+
"csukuangfj/vits-piper-es_ES-carlfm-x_low": _get_vits_piper,
|
263 |
+
}
|
264 |
|
265 |
language_to_models = {
|
266 |
"English": list(english_models.keys()),
|
267 |
"Chinese": list(chinese_models.keys()),
|
268 |
"German": list(german_models.keys()),
|
269 |
+
"Spanish": list(spanish_models.keys()),
|
270 |
}
|