csukuangfj commited on
Commit
f18e30d
1 Parent(s): 267004a

add Catalan

Browse files
Files changed (1) hide show
  1. model.py +9 -0
model.py CHANGED
@@ -271,6 +271,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
271
  return russian_models[repo_id](repo_id, speed)
272
  elif repo_id in arabic_models:
273
  return arabic_models[repo_id](repo_id, speed)
 
 
274
  else:
275
  raise ValueError(f"Unsupported repo_id: {repo_id}")
276
 
@@ -383,11 +385,18 @@ arabic_models = {
383
  "csukuangfj/vits-piper-ar_JO-kareem-medium": _get_vits_piper,
384
  }
385
 
 
 
 
 
 
 
386
  language_to_models = {
387
  "English": list(english_models.keys()),
388
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
389
  "Cantonese (粤语)": list(cantonese_models.keys()),
390
  "Arabic": list(arabic_models.keys()),
 
391
  "French": list(french_models.keys()),
392
  "German": list(german_models.keys()),
393
  "Russian": list(russian_models.keys()),
 
271
  return russian_models[repo_id](repo_id, speed)
272
  elif repo_id in arabic_models:
273
  return arabic_models[repo_id](repo_id, speed)
274
+ elif repo_id in catalan_models:
275
+ return catalan_models[repo_id](repo_id, speed)
276
  else:
277
  raise ValueError(f"Unsupported repo_id: {repo_id}")
278
 
 
385
  "csukuangfj/vits-piper-ar_JO-kareem-medium": _get_vits_piper,
386
  }
387
 
388
+ catalan_models = {
389
+ "csukuangfj/vits-piper-ca_ES-upc_ona-x_low": _get_vits_piper,
390
+ "csukuangfj/vits-piper-ca_ES-upc_ona-medium": _get_vits_piper,
391
+ "csukuangfj/vits-piper-ca_ES-upc_pau-x_low": _get_vits_piper,
392
+ }
393
+
394
  language_to_models = {
395
  "English": list(english_models.keys()),
396
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
397
  "Cantonese (粤语)": list(cantonese_models.keys()),
398
  "Arabic": list(arabic_models.keys()),
399
+ "Catalan": list(catalan_models.keys()),
400
  "French": list(french_models.keys()),
401
  "German": list(german_models.keys()),
402
  "Russian": list(russian_models.keys()),