Spaces:
Running
Running
csukuangfj
commited on
Commit
•
23ae73e
1
Parent(s):
a274fd5
add number of speakers
Browse files
model.py
CHANGED
@@ -118,6 +118,8 @@ def _get_vits_ljs(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
|
118 |
@lru_cache(maxsize=10)
|
119 |
def _get_vits_piper(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
120 |
data_dir = "/tmp/espeak-ng-data"
|
|
|
|
|
121 |
if "coqui" in repo_id or "vits-mms" in repo_id:
|
122 |
name = "model"
|
123 |
elif "piper" in repo_id:
|
@@ -441,46 +443,47 @@ chinese_models = {
|
|
441 |
}
|
442 |
|
443 |
english_models = {
|
444 |
-
"csukuangfj/vits-piper-en_US-glados": _get_vits_piper,
|
|
|
445 |
# coqui-ai
|
446 |
-
"csukuangfj/vits-coqui-en-ljspeech": _get_vits_piper,
|
447 |
-
"csukuangfj/vits-coqui-en-ljspeech-neon": _get_vits_piper,
|
448 |
-
"csukuangfj/vits-coqui-en-vctk": _get_vits_piper,
|
449 |
# piper, US
|
450 |
-
"csukuangfj/vits-piper-en_GB-sweetbbak-amy": _get_vits_piper,
|
451 |
-
"csukuangfj/vits-piper-en_US-amy-low": _get_vits_piper,
|
452 |
-
"csukuangfj/vits-piper-en_US-amy-medium": _get_vits_piper,
|
453 |
-
"csukuangfj/vits-piper-en_US-arctic-medium": _get_vits_piper, # 18 speakers
|
454 |
-
"csukuangfj/vits-piper-en_US-danny-low": _get_vits_piper,
|
455 |
-
"csukuangfj/vits-piper-en_US-hfc_male-medium": _get_vits_piper,
|
456 |
-
"csukuangfj/vits-piper-en_US-joe-medium": _get_vits_piper,
|
457 |
-
"csukuangfj/vits-piper-en_US-kathleen-low": _get_vits_piper,
|
458 |
-
"csukuangfj/vits-piper-en_US-kusal-medium": _get_vits_piper,
|
459 |
-
"csukuangfj/vits-piper-en_US-l2arctic-medium": _get_vits_piper, # 24 speakers
|
460 |
-
"csukuangfj/vits-piper-en_US-lessac-high": _get_vits_piper,
|
461 |
-
"csukuangfj/vits-piper-en_US-lessac-low": _get_vits_piper,
|
462 |
-
"csukuangfj/vits-piper-en_US-lessac-medium": _get_vits_piper,
|
463 |
-
"csukuangfj/vits-piper-en_US-libritts-high": _get_vits_piper, # 904 speakers
|
464 |
-
"csukuangfj/vits-piper-en_US-libritts_r-medium": _get_vits_piper, # 904 speakers
|
465 |
-
"csukuangfj/vits-piper-en_US-ljspeech-high": _get_vits_piper,
|
466 |
-
"csukuangfj/vits-piper-en_US-ljspeech-medium": _get_vits_piper,
|
467 |
-
"csukuangfj/vits-piper-en_US-ryan-high": _get_vits_piper,
|
468 |
-
"csukuangfj/vits-piper-en_US-ryan-low": _get_vits_piper,
|
469 |
-
"csukuangfj/vits-piper-en_US-ryan-medium": _get_vits_piper,
|
470 |
# piper, GB
|
471 |
-
"csukuangfj/vits-piper-en_GB-alan-low": _get_vits_piper,
|
472 |
-
"csukuangfj/vits-piper-en_GB-alan-medium": _get_vits_piper,
|
473 |
"csukuangfj/vits-piper-en_GB-alan-medium": _get_vits_piper,
|
474 |
-
"csukuangfj/vits-piper-en_GB-cori-high": _get_vits_piper,
|
475 |
-
"csukuangfj/vits-piper-en_GB-cori-medium": _get_vits_piper,
|
476 |
-
"csukuangfj/vits-piper-en_GB-jenny_dioco-medium": _get_vits_piper,
|
477 |
-
"csukuangfj/vits-piper-en_GB-northern_english_male-medium": _get_vits_piper,
|
478 |
-
"csukuangfj/vits-piper-en_GB-semaine-medium": _get_vits_piper,
|
479 |
-
"csukuangfj/vits-piper-en_GB-southern_english_female-low": _get_vits_piper,
|
480 |
-
"csukuangfj/vits-piper-en_GB-vctk-medium": _get_vits_piper,
|
481 |
#
|
482 |
-
"csukuangfj/vits-vctk": _get_vits_vctk, # 109 speakers
|
483 |
-
"csukuangfj/vits-ljs": _get_vits_ljs,
|
484 |
}
|
485 |
|
486 |
german_models = {
|
|
|
118 |
@lru_cache(maxsize=10)
|
119 |
def _get_vits_piper(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
|
120 |
data_dir = "/tmp/espeak-ng-data"
|
121 |
+
repo_id = repo_id.split("|")[0]
|
122 |
+
|
123 |
if "coqui" in repo_id or "vits-mms" in repo_id:
|
124 |
name = "model"
|
125 |
elif "piper" in repo_id:
|
|
|
443 |
}
|
444 |
|
445 |
english_models = {
|
446 |
+
"csukuangfj/vits-piper-en_US-glados|1 speaker": _get_vits_piper,
|
447 |
+
"csukuangfj/vits-piper-en_GB-southern_english_female-low|6 speakers": _get_vits_piper,
|
448 |
# coqui-ai
|
449 |
+
"csukuangfj/vits-coqui-en-ljspeech|1 speaker": _get_vits_piper,
|
450 |
+
"csukuangfj/vits-coqui-en-ljspeech-neon|1 speaker": _get_vits_piper,
|
451 |
+
"csukuangfj/vits-coqui-en-vctk|109 speakers": _get_vits_piper,
|
452 |
# piper, US
|
453 |
+
"csukuangfj/vits-piper-en_GB-sweetbbak-amy|1 speaker": _get_vits_piper,
|
454 |
+
"csukuangfj/vits-piper-en_US-amy-low|1 speaker": _get_vits_piper,
|
455 |
+
"csukuangfj/vits-piper-en_US-amy-medium|1 speaker": _get_vits_piper,
|
456 |
+
"csukuangfj/vits-piper-en_US-arctic-medium|18 speakers": _get_vits_piper, # 18 speakers
|
457 |
+
"csukuangfj/vits-piper-en_US-danny-low|1 speaker": _get_vits_piper,
|
458 |
+
"csukuangfj/vits-piper-en_US-hfc_male-medium|1 speaker": _get_vits_piper,
|
459 |
+
"csukuangfj/vits-piper-en_US-joe-medium|1 speaker": _get_vits_piper,
|
460 |
+
"csukuangfj/vits-piper-en_US-kathleen-low|1 speaker": _get_vits_piper,
|
461 |
+
"csukuangfj/vits-piper-en_US-kusal-medium|1 speaker": _get_vits_piper,
|
462 |
+
"csukuangfj/vits-piper-en_US-l2arctic-medium|24 speakers": _get_vits_piper, # 24 speakers
|
463 |
+
"csukuangfj/vits-piper-en_US-lessac-high|1 speaker": _get_vits_piper,
|
464 |
+
"csukuangfj/vits-piper-en_US-lessac-low|1 speaker": _get_vits_piper,
|
465 |
+
"csukuangfj/vits-piper-en_US-lessac-medium|1 speaker": _get_vits_piper,
|
466 |
+
"csukuangfj/vits-piper-en_US-libritts-high|904 speaker": _get_vits_piper, # 904 speakers
|
467 |
+
"csukuangfj/vits-piper-en_US-libritts_r-medium|904 speaker": _get_vits_piper, # 904 speakers
|
468 |
+
"csukuangfj/vits-piper-en_US-ljspeech-high|1 speaker": _get_vits_piper,
|
469 |
+
"csukuangfj/vits-piper-en_US-ljspeech-medium|1 speaker": _get_vits_piper,
|
470 |
+
"csukuangfj/vits-piper-en_US-ryan-high|1 speaker": _get_vits_piper,
|
471 |
+
"csukuangfj/vits-piper-en_US-ryan-low|1 speaker": _get_vits_piper,
|
472 |
+
"csukuangfj/vits-piper-en_US-ryan-medium|1 speaker": _get_vits_piper,
|
473 |
# piper, GB
|
474 |
+
"csukuangfj/vits-piper-en_GB-alan-low|1 speaker": _get_vits_piper,
|
475 |
+
"csukuangfj/vits-piper-en_GB-alan-medium|1 speaker": _get_vits_piper,
|
476 |
"csukuangfj/vits-piper-en_GB-alan-medium": _get_vits_piper,
|
477 |
+
"csukuangfj/vits-piper-en_GB-cori-high|1 speaker": _get_vits_piper,
|
478 |
+
"csukuangfj/vits-piper-en_GB-cori-medium|1 speaker": _get_vits_piper,
|
479 |
+
"csukuangfj/vits-piper-en_GB-jenny_dioco-medium|1 speaker": _get_vits_piper,
|
480 |
+
"csukuangfj/vits-piper-en_GB-northern_english_male-medium|1 speaker": _get_vits_piper,
|
481 |
+
"csukuangfj/vits-piper-en_GB-semaine-medium|4 speakers": _get_vits_piper,
|
482 |
+
"csukuangfj/vits-piper-en_GB-southern_english_female-low|1 speaker": _get_vits_piper,
|
483 |
+
"csukuangfj/vits-piper-en_GB-vctk-medium|109 speakers": _get_vits_piper,
|
484 |
#
|
485 |
+
"csukuangfj/vits-vctk|109 speakers": _get_vits_vctk, # 109 speakers
|
486 |
+
"csukuangfj/vits-ljs|1 speaker": _get_vits_ljs,
|
487 |
}
|
488 |
|
489 |
german_models = {
|