csukuangfj commited on
Commit
5e1c24b
2 Parent(s): 4897fc8 34a7ff6

Merge remote-tracking branch 'origin/main'

Browse files
Files changed (1) hide show
  1. model.py +22 -0
model.py CHANGED
@@ -202,6 +202,10 @@ 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 +260,27 @@ 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
+ 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
 
 
260
  "csukuangfj/vits-piper-de_DE-thorsten_emotional-medium": _get_vits_piper, # 8 speakers
261
  }
262
 
263
+ spanish_models = {
264
+ "csukuangfj/vits-piper-es_ES-carlfm-x_low": _get_vits_piper,
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-upmc-medium": _get_vits_piper, # 2 speakers, 0-femal, 1-male
276
+ "csukuangfj/vits-piper-fr_FR-siwis-low": _get_vits_piper, # female
277
+ "csukuangfj/vits-piper-fr_FR-siwis-medium": _get_vits_piper,
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
  }