csukuangfj commited on
Commit
1ae3349
1 Parent(s): 0ea07f8

add coqui models

Browse files
Files changed (1) hide show
  1. model.py +82 -0
model.py CHANGED
@@ -319,6 +319,26 @@ def get_pretrained_model(repo_id: str, speed: float) -> sherpa_onnx.OfflineTts:
319
  return turkish_models[repo_id](repo_id, speed)
320
  elif repo_id in vietnamese_models:
321
  return vietnamese_models[repo_id](repo_id, speed)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  else:
323
  raise ValueError(f"Unsupported repo_id: {repo_id}")
324
 
@@ -385,6 +405,7 @@ english_models = {
385
  }
386
 
387
  german_models = {
 
388
  "csukuangfj/vits-piper-de_DE-eva_k-x_low": _get_vits_piper,
389
  "csukuangfj/vits-piper-de_DE-karlsson-low": _get_vits_piper,
390
  "csukuangfj/vits-piper-de_DE-kerstin-low": _get_vits_piper,
@@ -397,6 +418,7 @@ german_models = {
397
  }
398
 
399
  spanish_models = {
 
400
  "csukuangfj/vits-piper-es_ES-carlfm-x_low": _get_vits_piper,
401
  "csukuangfj/vits-piper-es_ES-davefx-medium": _get_vits_piper,
402
  "csukuangfj/vits-piper-es_ES-mls_10246-low": _get_vits_piper,
@@ -406,6 +428,7 @@ spanish_models = {
406
  }
407
 
408
  french_models = {
 
409
  # "csukuangfj/vits-piper-fr_FR-gilles-low": _get_vits_piper,
410
  # "csukuangfj/vits-piper-fr_FR-mls_1840-low": _get_vits_piper,
411
  "csukuangfj/vits-piper-fr_FR-upmc-medium": _get_vits_piper, # 2 speakers, 0-femal, 1-male
@@ -443,6 +466,7 @@ catalan_models = {
443
  czech_models = {
444
  "csukuangfj/vits-piper-cs_CZ-jirka-low": _get_vits_piper,
445
  "csukuangfj/vits-piper-cs_CZ-jirka-medium": _get_vits_piper,
 
446
  }
447
 
448
  danish_models = {
@@ -454,11 +478,13 @@ greek_models = {
454
  }
455
 
456
  finnish_models = {
 
457
  "csukuangfj/vits-piper-fi_FI-harri-low": _get_vits_piper,
458
  "csukuangfj/vits-piper-fi_FI-harri-medium": _get_vits_piper,
459
  }
460
 
461
  hungarian_models = {
 
462
  "csukuangfj/vits-piper-hu_HU-anna-medium": _get_vits_piper,
463
  "csukuangfj/vits-piper-hu_HU-berta-medium": _get_vits_piper,
464
  "csukuangfj/vits-piper-hu_HU-imre-medium": _get_vits_piper,
@@ -495,6 +521,7 @@ nepali_models = {
495
  }
496
 
497
  dutch_models = {
 
498
  "csukuangfj/vits-piper-nl_BE-nathalie-medium": _get_vits_piper,
499
  "csukuangfj/vits-piper-nl_BE-nathalie-x_low": _get_vits_piper,
500
  "csukuangfj/vits-piper-nl_BE-rdh-medium": _get_vits_piper,
@@ -508,6 +535,7 @@ norwegian_models = {
508
  }
509
 
510
  polish_models = {
 
511
  "csukuangfj/vits-piper-pl_PL-darkman-medium": _get_vits_piper,
512
  "csukuangfj/vits-piper-pl_PL-gosia-medium": _get_vits_piper,
513
  "csukuangfj/vits-piper-pl_PL-mc_speech-medium": _get_vits_piper,
@@ -515,17 +543,20 @@ polish_models = {
515
  }
516
 
517
  portuguese_models = {
 
518
  "csukuangfj/vits-piper-pt_BR-edresson-low": _get_vits_piper,
519
  "csukuangfj/vits-piper-pt_BR-faber-medium": _get_vits_piper,
520
  "csukuangfj/vits-piper-pt_PT-tugao-medium": _get_vits_piper,
521
  }
522
 
523
  romanian_models = {
 
524
  "csukuangfj/vits-piper-ro_RO-mihai-medium": _get_vits_piper,
525
  }
526
 
527
 
528
  slovak_models = {
 
529
  "csukuangfj/vits-piper-sk_SK-lili-medium": _get_vits_piper,
530
  }
531
 
@@ -534,6 +565,7 @@ serbian_models = {
534
  }
535
 
536
  swedish_models = {
 
537
  "csukuangfj/vits-piper-sv_SE-nst-medium": _get_vits_piper,
538
  }
539
 
@@ -552,16 +584,61 @@ vietnamese_models = {
552
  "csukuangfj/vits-piper-vi_VN-vivos-x_low": _get_vits_piper,
553
  }
554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
 
556
  language_to_models = {
557
  "English": list(english_models.keys()),
558
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
559
  "Cantonese (粤语)": list(cantonese_models.keys()),
560
  "Arabic": list(arabic_models.keys()),
 
 
561
  "Catalan": list(catalan_models.keys()),
 
562
  "Czech": list(czech_models.keys()),
563
  "Danish": list(danish_models.keys()),
 
564
  "Dutch": list(dutch_models.keys()),
 
565
  "Finnish": list(finnish_models.keys()),
566
  "French": list(french_models.keys()),
567
  "Georgian": list(georgian_models.keys()),
@@ -569,9 +646,13 @@ language_to_models = {
569
  "Greek": list(greek_models.keys()),
570
  "Hungarian": list(hungarian_models.keys()),
571
  "Icelandic": list(icelandic_models.keys()),
 
572
  "Italian": list(italian_models.keys()),
573
  "Kazakh": list(kazakh_models.keys()),
 
 
574
  "Luxembourgish": list(luxembourgish_models.keys()),
 
575
  "Nepali": list(nepali_models.keys()),
576
  "Norwegian": list(norwegian_models.keys()),
577
  "Polish": list(polish_models.keys()),
@@ -580,6 +661,7 @@ language_to_models = {
580
  "Russian": list(russian_models.keys()),
581
  "Serbian": list(serbian_models.keys()),
582
  "Slovak": list(slovak_models.keys()),
 
583
  "Spanish": list(spanish_models.keys()),
584
  "Swahili": list(swahili_models.keys()),
585
  "Swedish": list(swedish_models.keys()),
 
319
  return turkish_models[repo_id](repo_id, speed)
320
  elif repo_id in vietnamese_models:
321
  return vietnamese_models[repo_id](repo_id, speed)
322
+ elif repo_id in bulgarian_models:
323
+ return bulgarian_models[repo_id](repo_id, speed)
324
+ elif repo_id in danish_models:
325
+ return danish_models[repo_id](repo_id, speed)
326
+ elif repo_id in estonian_models:
327
+ return estonian_models[repo_id](repo_id, speed)
328
+ elif repo_id in irish_models:
329
+ return irish_models[repo_id](repo_id, speed)
330
+ elif repo_id in croatian_models:
331
+ return croatian_models[repo_id](repo_id, speed)
332
+ elif repo_id in lithuanian_models:
333
+ return lithuanian_models[repo_id](repo_id, speed)
334
+ elif repo_id in latvian_models:
335
+ return lithuanian_models[repo_id](repo_id, speed)
336
+ elif repo_id in maltese_models:
337
+ return maltese_models[repo_id](repo_id, speed)
338
+ elif repo_id in slovenian_models:
339
+ return slovenian_models[repo_id](repo_id, speed)
340
+ elif repo_id in bangla_models:
341
+ return bangla_models[repo_id](repo_id, speed)
342
  else:
343
  raise ValueError(f"Unsupported repo_id: {repo_id}")
344
 
 
405
  }
406
 
407
  german_models = {
408
+ "csukuangfj/vits-coqui-de-css10": _get_vits_piper,
409
  "csukuangfj/vits-piper-de_DE-eva_k-x_low": _get_vits_piper,
410
  "csukuangfj/vits-piper-de_DE-karlsson-low": _get_vits_piper,
411
  "csukuangfj/vits-piper-de_DE-kerstin-low": _get_vits_piper,
 
418
  }
419
 
420
  spanish_models = {
421
+ "csukuangfj/vits-coqui-es-css10": _get_vits_piper,
422
  "csukuangfj/vits-piper-es_ES-carlfm-x_low": _get_vits_piper,
423
  "csukuangfj/vits-piper-es_ES-davefx-medium": _get_vits_piper,
424
  "csukuangfj/vits-piper-es_ES-mls_10246-low": _get_vits_piper,
 
428
  }
429
 
430
  french_models = {
431
+ "csukuangfj/vits-coqui-fr-css10": _get_vits_piper,
432
  # "csukuangfj/vits-piper-fr_FR-gilles-low": _get_vits_piper,
433
  # "csukuangfj/vits-piper-fr_FR-mls_1840-low": _get_vits_piper,
434
  "csukuangfj/vits-piper-fr_FR-upmc-medium": _get_vits_piper, # 2 speakers, 0-femal, 1-male
 
466
  czech_models = {
467
  "csukuangfj/vits-piper-cs_CZ-jirka-low": _get_vits_piper,
468
  "csukuangfj/vits-piper-cs_CZ-jirka-medium": _get_vits_piper,
469
+ "csukuangfj/vits-coqui-cs-cv": _get_vits_piper,
470
  }
471
 
472
  danish_models = {
 
478
  }
479
 
480
  finnish_models = {
481
+ "csukuangfj/vits-coqui-fi-css10": _get_vits_piper,
482
  "csukuangfj/vits-piper-fi_FI-harri-low": _get_vits_piper,
483
  "csukuangfj/vits-piper-fi_FI-harri-medium": _get_vits_piper,
484
  }
485
 
486
  hungarian_models = {
487
+ "csukuangfj/vits-coqui-hu-css10": _get_vits_piper,
488
  "csukuangfj/vits-piper-hu_HU-anna-medium": _get_vits_piper,
489
  "csukuangfj/vits-piper-hu_HU-berta-medium": _get_vits_piper,
490
  "csukuangfj/vits-piper-hu_HU-imre-medium": _get_vits_piper,
 
521
  }
522
 
523
  dutch_models = {
524
+ "csukuangfj/vits-coqui-nl-css10": _get_vits_piper,
525
  "csukuangfj/vits-piper-nl_BE-nathalie-medium": _get_vits_piper,
526
  "csukuangfj/vits-piper-nl_BE-nathalie-x_low": _get_vits_piper,
527
  "csukuangfj/vits-piper-nl_BE-rdh-medium": _get_vits_piper,
 
535
  }
536
 
537
  polish_models = {
538
+ "csukuangfj/vits-coqui-pl-mai_female": _get_vits_piper,
539
  "csukuangfj/vits-piper-pl_PL-darkman-medium": _get_vits_piper,
540
  "csukuangfj/vits-piper-pl_PL-gosia-medium": _get_vits_piper,
541
  "csukuangfj/vits-piper-pl_PL-mc_speech-medium": _get_vits_piper,
 
543
  }
544
 
545
  portuguese_models = {
546
+ "csukuangfj/vits-coqui-pt-cv": _get_vits_piper,
547
  "csukuangfj/vits-piper-pt_BR-edresson-low": _get_vits_piper,
548
  "csukuangfj/vits-piper-pt_BR-faber-medium": _get_vits_piper,
549
  "csukuangfj/vits-piper-pt_PT-tugao-medium": _get_vits_piper,
550
  }
551
 
552
  romanian_models = {
553
+ "csukuangfj/vits-coqui-ro-cv": _get_vits_piper,
554
  "csukuangfj/vits-piper-ro_RO-mihai-medium": _get_vits_piper,
555
  }
556
 
557
 
558
  slovak_models = {
559
+ "csukuangfj/vits-coqui-sk-cv": _get_vits_piper,
560
  "csukuangfj/vits-piper-sk_SK-lili-medium": _get_vits_piper,
561
  }
562
 
 
565
  }
566
 
567
  swedish_models = {
568
+ "csukuangfj/vits-coqui-sv-cv": _get_vits_piper,
569
  "csukuangfj/vits-piper-sv_SE-nst-medium": _get_vits_piper,
570
  }
571
 
 
584
  "csukuangfj/vits-piper-vi_VN-vivos-x_low": _get_vits_piper,
585
  }
586
 
587
+ bulgarian_models = {
588
+ "csukuangfj/vits-coqui-bg-cv": _get_vits_piper,
589
+ }
590
+
591
+ danish_models = {
592
+ "csukuangfj/vits-coqui-da-cv": _get_vits_piper,
593
+ }
594
+
595
+ estonian_models = {
596
+ "csukuangfj/vits-coqui-et-cv": _get_vits_piper,
597
+ }
598
+
599
+ irish_models = {
600
+ "csukuangfj/vits-coqui-ga-cv": _get_vits_piper,
601
+ }
602
+
603
+ croatian_models = {
604
+ "csukuangfj/vits-coqui-hr-cv": _get_vits_piper,
605
+ }
606
+
607
+ lithuanian_models = {
608
+ "csukuangfj/vits-coqui-lt-cv": _get_vits_piper,
609
+ }
610
+
611
+ latvian_models = {
612
+ "csukuangfj/vits-coqui-lv-cv": _get_vits_piper,
613
+ }
614
+
615
+ maltese_models = {
616
+ "csukuangfj/vits-coqui-mt-cv": _get_vits_piper,
617
+ }
618
+
619
+ slovenian_models = {
620
+ "csukuangfj/vits-coqui-sl-cv": _get_vits_piper,
621
+ }
622
+
623
+ bangla_models = {
624
+ "csukuangfj/vits-coqui-sl-cv": _get_vits_piper,
625
+ }
626
+
627
 
628
  language_to_models = {
629
  "English": list(english_models.keys()),
630
  "Chinese (Mandarin, 普通话)": list(chinese_models.keys()),
631
  "Cantonese (粤语)": list(cantonese_models.keys()),
632
  "Arabic": list(arabic_models.keys()),
633
+ "Bangla": list(bangla_models.keys()),
634
+ "Bulgarian": list(Bulgarian_models.keys()),
635
  "Catalan": list(catalan_models.keys()),
636
+ "Croatian": list(croatian_models.keys()),
637
  "Czech": list(czech_models.keys()),
638
  "Danish": list(danish_models.keys()),
639
+ "Danish": list(danish_models.keys()),
640
  "Dutch": list(dutch_models.keys()),
641
+ "Estonian": list(estonian_models.keys()),
642
  "Finnish": list(finnish_models.keys()),
643
  "French": list(french_models.keys()),
644
  "Georgian": list(georgian_models.keys()),
 
646
  "Greek": list(greek_models.keys()),
647
  "Hungarian": list(hungarian_models.keys()),
648
  "Icelandic": list(icelandic_models.keys()),
649
+ "Irish": list(irish_models.keys()),
650
  "Italian": list(italian_models.keys()),
651
  "Kazakh": list(kazakh_models.keys()),
652
+ "Latvian": list(latvian_models.keys()),
653
+ "Lithuanian": list(lithuanian_models.keys()),
654
  "Luxembourgish": list(luxembourgish_models.keys()),
655
+ "Maltese": list(maltese_models.keys()),
656
  "Nepali": list(nepali_models.keys()),
657
  "Norwegian": list(norwegian_models.keys()),
658
  "Polish": list(polish_models.keys()),
 
661
  "Russian": list(russian_models.keys()),
662
  "Serbian": list(serbian_models.keys()),
663
  "Slovak": list(slovak_models.keys()),
664
+ "Slovenian": list(slovenian_models.keys()),
665
  "Spanish": list(spanish_models.keys()),
666
  "Swahili": list(swahili_models.keys()),
667
  "Swedish": list(swedish_models.keys()),