From b5758d74c5eb2a332aa097a8b41fd62f8b36bed8 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Sun, 5 Jan 2025 22:54:59 +0800 Subject: [PATCH] download vocoder --- .github/workflows/apk-tts-engine.yaml | 7 +++---- .github/workflows/apk-tts.yaml | 6 ++---- scripts/apk/build-apk-tts-engine.sh.in | 5 +++++ scripts/apk/build-apk-tts.sh.in | 6 ++++++ scripts/apk/generate-tts-apk-script.py | 3 +-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/apk-tts-engine.yaml b/.github/workflows/apk-tts-engine.yaml index e097425ff..68fdaa05d 100644 --- a/.github/workflows/apk-tts-engine.yaml +++ b/.github/workflows/apk-tts-engine.yaml @@ -23,10 +23,9 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - # total: ["40"] - # 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", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"] - total: ["1"] - index: ["0"] + total: ["40"] + 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", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"] + steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/apk-tts.yaml b/.github/workflows/apk-tts.yaml index d960f3faf..1609739c6 100644 --- a/.github/workflows/apk-tts.yaml +++ b/.github/workflows/apk-tts.yaml @@ -23,10 +23,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - # total: ["40"] - # 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", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"] - total: ["1"] - index: ["0"] + total: ["40"] + 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", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"] steps: - uses: actions/checkout@v4 diff --git a/scripts/apk/build-apk-tts-engine.sh.in b/scripts/apk/build-apk-tts-engine.sh.in index 87bf17f81..69933d2fc 100644 --- a/scripts/apk/build-apk-tts-engine.sh.in +++ b/scripts/apk/build-apk-tts-engine.sh.in @@ -46,6 +46,10 @@ wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/$mod tar xf $model_dir.tar.bz2 rm $model_dir.tar.bz2 +{% if tts_model.vocoder %} + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/$vocoder +{% endif %} + popd # Now we are at the project root directory @@ -122,6 +126,7 @@ for arch in arm64-v8a armeabi-v7a x86_64 x86; do done rm -rf ./android/SherpaOnnxTtsEngine/app/src/main/assets/$model_dir +rm -fv ./android/SherpaOnnxTtsEngine/app/src/main/assets/*.onnx {% endfor %} git checkout . diff --git a/scripts/apk/build-apk-tts.sh.in b/scripts/apk/build-apk-tts.sh.in index a75bf93c4..34135f1a1 100644 --- a/scripts/apk/build-apk-tts.sh.in +++ b/scripts/apk/build-apk-tts.sh.in @@ -45,6 +45,10 @@ wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/$mod tar xf $model_dir.tar.bz2 rm $model_dir.tar.bz2 +{% if tts_model.vocoder %} + curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/$vocoder +{% endif %} + popd # Now we are at the project root directory @@ -122,6 +126,8 @@ for arch in arm64-v8a armeabi-v7a x86_64 x86; do done rm -rf ./android/SherpaOnnxTts/app/src/main/assets/$model_dir +rm -fv ./android/SherpaOnnxTts/app/src/main/assets/*.onnx + {% endfor %} git checkout . diff --git a/scripts/apk/generate-tts-apk-script.py b/scripts/apk/generate-tts-apk-script.py index 6e9766db0..1d804ecf9 100755 --- a/scripts/apk/generate-tts-apk-script.py +++ b/scripts/apk/generate-tts-apk-script.py @@ -420,8 +420,7 @@ def main(): all_model_list += get_piper_models() all_model_list += get_mimic3_models() all_model_list += get_coqui_models() - - all_model_list = get_matcha_models() + all_model_list += get_matcha_models() convert_lang_to_iso_639_3(all_model_list) print(all_model_list)