csukuangfj commited on
Commit
51a3cc9
1 Parent(s): d5f48a5

small fixes

Browse files
Files changed (1) hide show
  1. model.py +16 -4
model.py CHANGED
@@ -202,9 +202,13 @@ def _get_vits_zh_aishell3(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
202
 
203
 
204
  @lru_cache(maxsize=10)
205
- def _get_vits_hf_fanchen(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
206
- assert "csukuangfj/vits-zh-hf-fanchen" in repo_id, repo_id
207
- model = repo_id.split("/")[-1]
 
 
 
 
208
 
209
  model = get_file(
210
  repo_id=repo_id,
@@ -267,7 +271,15 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
267
 
268
  chinese_models = {
269
  "csukuangfj/vits-zh-aishell3": _get_vits_zh_aishell3,
270
- "csukuangfj/vits-zh-hf-fanchen-wnj": _get_vits_hf_fanchen,
 
 
 
 
 
 
 
 
271
  # "csukuangfj/vits-piper-zh_CN-huayan-x_low": _get_vits_piper,
272
  # "csukuangfj/vits-piper-zh_CN-huayan-medium": _get_vits_piper,
273
  }
 
202
 
203
 
204
  @lru_cache(maxsize=10)
205
+ def _get_vits_hf(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
206
+ assert "csukuangfj/vits-zh-hf" in repo_id, repo_id
207
+
208
+ if "fanchen" in repo_id:
209
+ model = repo_id.split("/")[-1]
210
+ else:
211
+ model = repo_id.split("-")[-1]
212
 
213
  model = get_file(
214
  repo_id=repo_id,
 
271
 
272
  chinese_models = {
273
  "csukuangfj/vits-zh-aishell3": _get_vits_zh_aishell3,
274
+ "csukuangfj/vits-zh-hf-fanchen-wnj": _get_vits_hf,
275
+ "csukuangfj/vits-zh-hf-doom": _get_vits_hf,
276
+ "csukuangfj/vits-zh-hf-echo": _get_vits_hf,
277
+ "csukuangfj/vits-zh-hf-zenyatta": _get_vits_hf,
278
+ "csukuangfj/vits-zh-hf-abyssinvoker": _get_vits_hf,
279
+ "csukuangfj/vits-zh-hf-keqing": _get_vits_hf,
280
+ "csukuangfj/vits-zh-hf-eula": _get_vits_hf,
281
+ "csukuangfj/vits-zh-hf-bronya": _get_vits_hf,
282
+ "csukuangfj/vits-zh-hf-theresa": _get_vits_hf,
283
  # "csukuangfj/vits-piper-zh_CN-huayan-x_low": _get_vits_piper,
284
  # "csukuangfj/vits-piper-zh_CN-huayan-medium": _get_vits_piper,
285
  }