csukuangfj commited on
Commit
d6d04e6
1 Parent(s): 51ff7ff

add persian+english tts model

Browse files
Files changed (1) hide show
  1. model.py +7 -0
model.py CHANGED
@@ -329,6 +329,8 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
329
  return chinese_models[repo_id](repo_id, speed)
330
  elif repo_id in chinese_english_models:
331
  return chinese_english_models[repo_id](repo_id, speed)
 
 
332
  if repo_id in cantonese_models:
333
  return cantonese_models[repo_id](repo_id, speed)
334
  elif repo_id in english_models:
@@ -437,6 +439,10 @@ chinese_english_models = {
437
  "csukuangfj/vits-melo-tts-zh_en|1": _get_vits_hf, # 1
438
  }
439
 
 
 
 
 
440
  chinese_models = {
441
  "csukuangfj/vits-zh-hf-fanchen-wnj|1": _get_vits_hf, # 1
442
  "csukuangfj/vits-zh-hf-fanchen-C|187": _get_vits_hf, # 187
@@ -781,6 +787,7 @@ language_to_models = {
781
  "English": list(english_models.keys()),
782
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
783
  "Chinese+English": list(chinese_english_models.keys()),
 
784
  "Cantonese (粤语)": list(cantonese_models.keys()),
785
  "Min-nan (闽南话)": list(min_nan_models.keys()),
786
  "Arabic": list(arabic_models.keys()),
 
329
  return chinese_models[repo_id](repo_id, speed)
330
  elif repo_id in chinese_english_models:
331
  return chinese_english_models[repo_id](repo_id, speed)
332
+ elif repo_id in persian_english_models:
333
+ return persian_english_models[repo_id](repo_id, speed)
334
  if repo_id in cantonese_models:
335
  return cantonese_models[repo_id](repo_id, speed)
336
  elif repo_id in english_models:
 
439
  "csukuangfj/vits-melo-tts-zh_en|1": _get_vits_hf, # 1
440
  }
441
 
442
+ persian_english_models = {
443
+ "csukuangfj/vits-piper-fa_en-rezahedayatfar-ibrahimwalk-medium|1": _get_vits_piper, # 1
444
+ }
445
+
446
  chinese_models = {
447
  "csukuangfj/vits-zh-hf-fanchen-wnj|1": _get_vits_hf, # 1
448
  "csukuangfj/vits-zh-hf-fanchen-C|187": _get_vits_hf, # 187
 
787
  "English": list(english_models.keys()),
788
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
789
  "Chinese+English": list(chinese_english_models.keys()),
790
+ "Persian+English": list(persian_english_models.keys()),
791
  "Cantonese (粤语)": list(cantonese_models.keys()),
792
  "Min-nan (闽南话)": list(min_nan_models.keys()),
793
  "Arabic": list(arabic_models.keys()),