csukuangfj commited on
Commit
4730e63
1 Parent(s): d925f9e

add persian

Browse files
Files changed (1) hide show
  1. model.py +6 -6
model.py CHANGED
@@ -346,8 +346,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
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
- # elif repo_id in persian_models:
350
- # return persian_models[repo_id](repo_id, speed)
351
  else:
352
  raise ValueError(f"Unsupported repo_id: {repo_id}")
353
 
@@ -640,9 +640,9 @@ thai_models = {
640
  "csukuangfj/vits-mms-tha": _get_vits_mms,
641
  }
642
 
643
- # persian_models = {
644
- # "csukuangfj/vits-piper-fa-haaniye_low": _get_vits_piper,
645
- # }
646
 
647
 
648
  language_to_models = {
@@ -675,7 +675,7 @@ language_to_models = {
675
  "Maltese": list(maltese_models.keys()),
676
  "Nepali": list(nepali_models.keys()),
677
  "Norwegian": list(norwegian_models.keys()),
678
- # "Persian": list(persian_models.keys()),
679
  "Polish": list(polish_models.keys()),
680
  "Portuguese": list(portuguese_models.keys()),
681
  "Romanian": list(romanian_models.keys()),
 
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
+ elif repo_id in persian_models:
350
+ return persian_models[repo_id](repo_id, speed)
351
  else:
352
  raise ValueError(f"Unsupported repo_id: {repo_id}")
353
 
 
640
  "csukuangfj/vits-mms-tha": _get_vits_mms,
641
  }
642
 
643
+ persian_models = {
644
+ "csukuangfj/vits-piper-fa-haaniye_low": _get_vits_piper,
645
+ }
646
 
647
 
648
  language_to_models = {
 
675
  "Maltese": list(maltese_models.keys()),
676
  "Nepali": list(nepali_models.keys()),
677
  "Norwegian": list(norwegian_models.keys()),
678
+ "Persian": list(persian_models.keys()),
679
  "Polish": list(polish_models.keys()),
680
  "Portuguese": list(portuguese_models.keys()),
681
  "Romanian": list(romanian_models.keys()),