csukuangfj commited on
Commit
15402cf
1 Parent(s): 48dc914

add 2 new models from coqui

Browse files
Files changed (1) hide show
  1. model.py +8 -5
model.py CHANGED
@@ -228,11 +228,14 @@ def _get_vits_hf(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
228
  subfolder=".",
229
  )
230
 
231
- rule_fst = get_file(
232
- repo_id=repo_id,
233
- filename="rule.fst",
234
- subfolder=".",
235
- )
 
 
 
236
 
237
  tts_config = sherpa_onnx.OfflineTtsConfig(
238
  model=sherpa_onnx.OfflineTtsModelConfig(
 
228
  subfolder=".",
229
  )
230
 
231
+ if "coqui" not in repo_id:
232
+ rule_fst = get_file(
233
+ repo_id=repo_id,
234
+ filename="rule.fst",
235
+ subfolder=".",
236
+ )
237
+ else:
238
+ rule_fst = ""
239
 
240
  tts_config = sherpa_onnx.OfflineTtsConfig(
241
  model=sherpa_onnx.OfflineTtsModelConfig(