Skip to content

Commit

Permalink
add more data
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Nov 30, 2023
1 parent e3bf431 commit a8c68fb
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/apk-tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
total: ["12"]
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"]
total: ["30"]
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"]

steps:
- uses: actions/checkout@v4
Expand Down
128 changes: 89 additions & 39 deletions scripts/apk/generate-tts-apk-script.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,35 @@ class TtsModel:
data_dir: Optional[str] = None


def get_piper_english_models() -> List[TtsModel]:
def get_piper_models() -> List[TtsModel]:
models = [
TtsModel(model_dir="vits-piper-ar_JO-kareem-low"),
TtsModel(model_dir="vits-piper-ar_JO-kareem-medium"),
TtsModel(model_dir="vits-piper-ca_ES-upc_ona-medium"),
TtsModel(model_dir="vits-piper-ca_ES-upc_ona-x_low"),
TtsModel(model_dir="vits-piper-ca_ES-upc_pau-x_low"),
TtsModel(model_dir="vits-piper-ca_ES-upc_pau-x_low"),
TtsModel(model_dir="vits-piper-cs_CZ-jirka-medium"),
TtsModel(model_dir="vits-piper-da_DK-talesyntese-medium"),
TtsModel(model_dir="vits-piper-de_DE-eva_k-x_low"),
TtsModel(model_dir="vits-piper-de_DE-karlsson-low"),
TtsModel(model_dir="vits-piper-de_DE-kerstin-low"),
TtsModel(model_dir="vits-piper-de_DE-pavoque-low"),
TtsModel(model_dir="vits-piper-de_DE-ramona-low"),
TtsModel(model_dir="vits-piper-de_DE-thorsten-high"),
TtsModel(model_dir="vits-piper-de_DE-thorsten-low"),
TtsModel(model_dir="vits-piper-de_DE-thorsten-medium"),
TtsModel(model_dir="vits-piper-de_DE-thorsten_emotional-medium"),
TtsModel(model_dir="vits-piper-el_GR-rapunzelina-low"),
TtsModel(model_dir="vits-piper-en_GB-alan-low"),
TtsModel(model_dir="vits-piper-en_GB-alan-medium"),
TtsModel(model_dir="vits-piper-en_GB-alba-medium"),
TtsModel(model_dir="vits-piper-en_GB-jenny_dioco-medium"),
TtsModel(model_dir="vits-piper-en_GB-northern_english_male-medium"),
TtsModel(model_dir="vits-piper-en_GB-semaine-medium"),
TtsModel(model_dir="vits-piper-en_GB-southern_english_female-low"),
TtsModel(model_dir="vits-piper-en_GB-sweetbbak-amy"),
TtsModel(model_dir="vits-piper-en_GB-vctk-medium"),
TtsModel(model_dir="vits-piper-en_US-amy-low"),
TtsModel(model_dir="vits-piper-en_US-amy-medium"),
TtsModel(model_dir="vits-piper-en_US-arctic-medium"),
Expand All @@ -44,26 +71,74 @@ def get_piper_english_models() -> List[TtsModel]:
TtsModel(model_dir="vits-piper-en_US-kathleen-low"),
TtsModel(model_dir="vits-piper-en_US-kusal-medium"),
TtsModel(model_dir="vits-piper-en_US-l2arctic-medium"),
TtsModel(model_dir="vits-piper-en_US-lessac-high"),
TtsModel(model_dir="vits-piper-en_US-lessac-low"),
TtsModel(model_dir="vits-piper-en_US-lessac-medium"),
TtsModel(model_dir="vits-piper-en_US-lessac-high"),
TtsModel(model_dir="vits-piper-en_US-libritts-high"),
TtsModel(model_dir="vits-piper-en_US-libritts_r-medium"),
TtsModel(model_dir="vits-piper-en_US-ryan-high"),
TtsModel(model_dir="vits-piper-en_US-ryan-low"),
TtsModel(model_dir="vits-piper-en_US-ryan-medium"),
TtsModel(model_dir="vits-piper-en_US-ryan-high"),
# English (GB)
TtsModel(model_dir="vits-piper-en_GB-alan-low"),
TtsModel(model_dir="vits-piper-en_GB-alan-medium"),
TtsModel(model_dir="vits-piper-en_GB-alba-medium"),
TtsModel(model_dir="vits-piper-en_GB-jenny_dioco-medium"),
TtsModel(model_dir="vits-piper-en_GB-northern_english_male-medium"),
TtsModel(model_dir="vits-piper-en_GB-semaine-medium"),
TtsModel(model_dir="vits-piper-en_GB-southern_english_female-low"),
TtsModel(model_dir="vits-piper-en_GB-vctk-medium"),
TtsModel(model_dir="vits-piper-es_ES-carlfm-x_low"),
TtsModel(model_dir="vits-piper-es_ES-davefx-medium"),
TtsModel(model_dir="vits-piper-es_ES-mls_10246-low"),
TtsModel(model_dir="vits-piper-es_ES-mls_9972-low"),
TtsModel(model_dir="vits-piper-es_ES-sharvard-medium"),
TtsModel(model_dir="vits-piper-es_MX-ald-medium"),
TtsModel(model_dir="vits-piper-fi_FI-harri-low"),
TtsModel(model_dir="vits-piper-fi_FI-harri-medium"),
TtsModel(model_dir="vits-piper-fr_FR-siwis-low"),
TtsModel(model_dir="vits-piper-fr_FR-siwis-medium"),
TtsModel(model_dir="vits-piper-fr_FR-upmc-medium"),
TtsModel(model_dir="vits-piper-hu_HU-anna-medium"),
TtsModel(model_dir="vits-piper-hu_HU-berta-medium"),
TtsModel(model_dir="vits-piper-hu_HU-imre-medium"),
TtsModel(model_dir="vits-piper-is_IS-bui-medium"),
TtsModel(model_dir="vits-piper-is_IS-salka-medium"),
TtsModel(model_dir="vits-piper-is_IS-steinn-medium"),
TtsModel(model_dir="vits-piper-is_IS-ugla-medium"),
TtsModel(model_dir="vits-piper-it_IT-riccardo-x_low"),
TtsModel(model_dir="vits-piper-ka_GE-natia-medium"),
TtsModel(model_dir="vits-piper-kk_KZ-iseke-x_low"),
TtsModel(model_dir="vits-piper-kk_KZ-issai-high"),
TtsModel(model_dir="vits-piper-kk_KZ-raya-x_low"),
TtsModel(model_dir="vits-piper-lb_LU-marylux-medium"),
TtsModel(model_dir="vits-piper-ne_NP-google-medium"),
TtsModel(model_dir="vits-piper-ne_NP-google-x_low"),
TtsModel(model_dir="vits-piper-nl_BE-nathalie-medium"),
TtsModel(model_dir="vits-piper-nl_BE-nathalie-x_low"),
TtsModel(model_dir="vits-piper-nl_BE-rdh-medium"),
TtsModel(model_dir="vits-piper-nl_BE-rdh-x_low"),
TtsModel(model_dir="vits-piper-nl_NL-mls_5809-low"),
TtsModel(model_dir="vits-piper-nl_NL-mls_7432-low"),
TtsModel(model_dir="vits-piper-no_NO-talesyntese-medium"),
TtsModel(model_dir="vits-piper-pl_PL-darkman-medium"),
TtsModel(model_dir="vits-piper-pl_PL-gosia-medium"),
TtsModel(model_dir="vits-piper-pl_PL-mc_speech-medium"),
TtsModel(model_dir="vits-piper-pl_PL-mls_6892-low"),
TtsModel(model_dir="vits-piper-pt_BR-edresson-low"),
TtsModel(model_dir="vits-piper-pt_BR-faber-medium"),
TtsModel(model_dir="vits-piper-pt_PT-tugao-medium"),
TtsModel(model_dir="vits-piper-ro_RO-mihai-medium"),
TtsModel(model_dir="vits-piper-ru_RU-denis-medium"),
TtsModel(model_dir="vits-piper-ru_RU-dmitri-medium"),
TtsModel(model_dir="vits-piper-ru_RU-irina-medium"),
TtsModel(model_dir="vits-piper-ru_RU-ruslan-medium"),
TtsModel(model_dir="vits-piper-sk_SK-lili-medium"),
TtsModel(model_dir="vits-piper-sr_RS-serbski_institut-medium"),
TtsModel(model_dir="vits-piper-sv_SE-nst-medium"),
TtsModel(model_dir="vits-piper-sw_CD-lanfrica-medium"),
TtsModel(model_dir="vits-piper-tr_TR-dfki-medium"),
TtsModel(model_dir="vits-piper-tr_TR-fahrettin-medium"),
TtsModel(model_dir="vits-piper-uk_UA-lada-x_low"),
TtsModel(model_dir="vits-piper-uk_UA-ukrainian_tts-medium"),
TtsModel(model_dir="vits-piper-vi_VN-25hours_single-low"),
TtsModel(model_dir="vits-piper-vi_VN-vais1000-medium"),
TtsModel(model_dir="vits-piper-vi_VN-vivos-x_low"),
TtsModel(model_dir="vits-piper-zh_CN-huayan-medium"),
]
for m in models:
m.data_dir = m.model_dir + "/" + "espeak-data-ng"
m.data_dir = m.model_dir + "/" + "espeak-ng-data"
m.model_name = m.model_dir[len("vits-piper-") :] + ".onnx"
m.lang = "en"

Expand Down Expand Up @@ -136,31 +211,6 @@ def get_all_models() -> List[TtsModel]:
# English (US)
TtsModel(model_dir="vits-vctk", model_name="vits-vctk.onnx", lang="en"),
TtsModel(model_dir="vits-ljs", model_name="vits-ljs.onnx", lang="en"),

# German (DE)
TtsModel(model_dir="vits-piper-de_DE-eva_k-x_low", model_name="de_DE-eva_k-x_low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-karlsson-low", model_name="de_DE-karlsson-low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-kerstin-low", model_name="de_DE-kerstin-low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-pavoque-low", model_name="de_DE-pavoque-low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-ramona-low", model_name="de_DE-ramona-low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-thorsten-low", model_name="de_DE-thorsten-low.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-thorsten-medium", model_name="de_DE-thorsten-medium.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-thorsten-high", model_name="de_DE-thorsten-high.onnx",lang="de",),
TtsModel(model_dir="vits-piper-de_DE-thorsten_emotional-medium", model_name="de_DE-thorsten_emotional-medium.onnx",lang="de",),
# French (FR)
TtsModel(model_dir="vits-piper-fr_FR-upmc-medium", model_name="fr_FR-upmc-medium.onnx",lang="fr",),
TtsModel(model_dir="vits-piper-fr_FR-siwis-low", model_name="fr_FR-siwis-low.onnx",lang="fr",),
TtsModel(model_dir="vits-piper-fr_FR-siwis-medium", model_name="fr_FR-siwis-medium.onnx",lang="fr",),

# Spanish (ES)
TtsModel(model_dir="vits-piper-es_ES-carlfm-x_low", model_name="es_ES-carlfm-x_low.onnx",lang="es",),
TtsModel(model_dir="vits-piper-es_ES-davefx-medium", model_name="es_ES-davefx-medium.onnx",lang="es",),
TtsModel(model_dir="vits-piper-es_ES-mls_10246-low", model_name="es_ES-mls_10246-low.onnx",lang="es",),
TtsModel(model_dir="vits-piper-es_ES-mls_9972-low", model_name="es_ES-mls_9972-low.onnx",lang="es",),
TtsModel(model_dir="vits-piper-es_ES-sharvard-medium", model_name="es_ES-sharvard-medium.onnx",lang="es",),

# Spanish (MX)
TtsModel(model_dir="vits-piper-es_MX-ald-medium", model_name="es_MX-ald-medium.onnx",lang="es",),
# fmt: on
]

Expand All @@ -176,7 +226,7 @@ def main():
template = environment.from_string(s)
d = dict()
# all_model_list = get_all_models()
all_model_list = get_piper_english_models()
all_model_list = get_piper_models()
num_models = len(all_model_list)

num_per_runner = num_models // total
Expand Down

0 comments on commit a8c68fb

Please sign in to comment.