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

add arabic models

Browse files
Files changed (1) hide show
  1. model.py +10 -2
model.py CHANGED
@@ -269,6 +269,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
269
  return ukrainian_models[repo_id](repo_id, speed)
270
  elif repo_id in russian_models:
271
  return russian_models[repo_id](repo_id, speed)
 
 
272
  else:
273
  raise ValueError(f"Unsupported repo_id: {repo_id}")
274
 
@@ -376,13 +378,19 @@ russian_models = {
376
  "csukuangfj/vits-piper-ru_RU-ruslan-medium": _get_vits_piper,
377
  }
378
 
 
 
 
 
 
379
  language_to_models = {
380
  "English": list(english_models.keys()),
381
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
382
  "Cantonese (粤语)": list(cantonese_models.keys()),
 
 
383
  "German": list(german_models.keys()),
 
384
  "Spanish": list(spanish_models.keys()),
385
- "French": list(french_models.keys()),
386
  "Ukrainian": list(ukrainian_models.keys()),
387
- "Russian": list(russian_models.keys()),
388
  }
 
269
  return ukrainian_models[repo_id](repo_id, speed)
270
  elif repo_id in russian_models:
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
 
 
378
  "csukuangfj/vits-piper-ru_RU-ruslan-medium": _get_vits_piper,
379
  }
380
 
381
+ arabic_models = {
382
+ "csukuangfj/vits-piper-ar_JO-kareem-low": _get_vits_piper,
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()),
394
  "Spanish": list(spanish_models.keys()),
 
395
  "Ukrainian": list(ukrainian_models.keys()),
 
396
  }