Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Jul 16, 2024
1 parent 70460e6 commit c4cfb2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/export-melo-tts-to-onnx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
curl -SL -O https://raw.githubusercontent.com/myshell-ai/MeloTTS/main/LICENSE
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-aishell3-vits-low-2024-04-06/resolve/main/data/new_heteronym.fst
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-aishell3-vits-low-2024-04-06/resolve/main/data/date.fst
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-aishell3-vits-low-2024-04-06/resolve/main/data/number.fst
curl -SL -O https://huggingface.co/csukuangfj/icefall-tts-aishell3-vits-low-2024-04-06/resolve/main/data/phone.fst
Expand Down
14 changes: 1 addition & 13 deletions scripts/flutter/generate-tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

import jinja2

# pip install iso639-lang
from iso639 import Lang


def get_args():
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -37,13 +34,6 @@ class TtsModel:
data_dir: Optional[str] = None
dict_dir: Optional[str] = None
is_char: bool = False
lang_iso_639_3: str = ""


def convert_lang_to_iso_639_3(models: List[TtsModel]):
for m in models:
if m.lang_iso_639_3 == "":
m.lang_iso_639_3 = Lang(m.lang).pt3


def get_coqui_models() -> List[TtsModel]:
Expand Down Expand Up @@ -315,7 +305,7 @@ def get_vits_models() -> List[TtsModel]:
TtsModel(
model_dir="vits-melo-tts-zh_en",
model_name="model.onnx",
lang="zh",
lang="zh_en",
),
TtsModel(
model_dir="vits-zh-hf-fanchen-C",
Expand Down Expand Up @@ -364,7 +354,6 @@ def get_vits_models() -> List[TtsModel]:
model_dir="vits-cantonese-hf-xiaomaiiwn",
model_name="vits-cantonese-hf-xiaomaiiwn.onnx",
lang="cantonese",
lang_iso_639_3="yue",
rule_fsts="vits-cantonese-hf-xiaomaiiwn/rule.fst",
),
# English (US)
Expand All @@ -387,7 +376,6 @@ def main():
all_model_list += get_piper_models()
all_model_list += get_mimic3_models()
all_model_list += get_coqui_models()
convert_lang_to_iso_639_3(all_model_list)

num_models = len(all_model_list)

Expand Down

0 comments on commit c4cfb2d

Please sign in to comment.