csukuangfj commited on
Commit
9462bda
1 Parent(s): 79cd679

small fixes

Browse files
Files changed (1) hide show
  1. model.py +6 -1
model.py CHANGED
@@ -118,9 +118,14 @@ def _get_vits_piper(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
118
  data_dir = "/tmp/espeak-ng-data"
119
  if "coqui" in repo_id or "vits-mms" in repo_id:
120
  name = "model"
121
- else:
122
  n = len("vits-piper-")
123
  name = repo_id.split("/")[1][n:]
 
 
 
 
 
124
 
125
  if "vits-coqui-uk-mai" in repo_id or "vits-mms" in repo_id:
126
  data_dir = ""
 
118
  data_dir = "/tmp/espeak-ng-data"
119
  if "coqui" in repo_id or "vits-mms" in repo_id:
120
  name = "model"
121
+ elif "piper" in repo_id:
122
  n = len("vits-piper-")
123
  name = repo_id.split("/")[1][n:]
124
+ elif "mimic3" in repo_id:
125
+ n = len("vits-mimic3-")
126
+ name = repo_id.split("/")[1][n:]
127
+ else:
128
+ raise ValueError(f"Unsupported {repo_id}")
129
 
130
  if "vits-coqui-uk-mai" in repo_id or "vits-mms" in repo_id:
131
  data_dir = ""