Fangjun Kuang
Committed by GitHub

Publish wasm tts to model scope. (#599)

@@ -81,5 +81,5 @@ jobs: @@ -81,5 +81,5 @@ jobs:
81 81
82 - uses: actions/upload-artifact@v4 82 - uses: actions/upload-artifact@v4
83 with: 83 with:
84 - name: tts-generated-test-files-${{ matrix.os }}-${{ matrix.python-version } 84 + name: tts-generated-test-files-${{ matrix.os }}-${{ matrix.python-version }}
85 path: tts 85 path: tts
@@ -71,6 +71,41 @@ jobs: @@ -71,6 +71,41 @@ jobs:
71 name: sherpa-onnx-wasm-simd-de-tts 71 name: sherpa-onnx-wasm-simd-de-tts
72 path: ./sherpa-onnx-wasm-simd-*.tar.bz2 72 path: ./sherpa-onnx-wasm-simd-*.tar.bz2
73 73
  74 + - name: Publish to ModelScope
  75 + env:
  76 + MS_TOKEN: ${{ secrets.MODEL_SCOPE_GIT_TOKEN }}
  77 + uses: nick-fields/retry@v2
  78 + with:
  79 + max_attempts: 20
  80 + timeout_seconds: 200
  81 + shell: bash
  82 + command: |
  83 + SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
  84 +
  85 + git config --global user.email "csukuangfj@gmail.com"
  86 + git config --global user.name "Fangjun Kuang"
  87 +
  88 + rm -rf ms
  89 + export GIT_LFS_SKIP_SMUDGE=1
  90 +
  91 + git clone http://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-de.git ms
  92 +
  93 + cd ms
  94 + git fetch
  95 + git pull
  96 + git merge -m "merge remote" --ff origin main
  97 +
  98 + cp -v ../sherpa-onnx-wasm-simd-${SHERPA_ONNX_VERSION}-de-tts/* .
  99 +
  100 + git status
  101 + git lfs track "*.data"
  102 + git lfs track "*.wasm"
  103 + ls -lh
  104 +
  105 + git add .
  106 + git commit -m "update model"
  107 + git push http://oauth2:${MS_TOKEN}@www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-de.git
  108 +
74 - name: Publish to huggingface 109 - name: Publish to huggingface
75 env: 110 env:
76 HF_TOKEN: ${{ secrets.HF_TOKEN }} 111 HF_TOKEN: ${{ secrets.HF_TOKEN }}
@@ -69,6 +69,40 @@ jobs: @@ -69,6 +69,40 @@ jobs:
69 name: sherpa-onnx-wasm-simd-en-tts 69 name: sherpa-onnx-wasm-simd-en-tts
70 path: ./sherpa-onnx-wasm-simd-*.tar.bz2 70 path: ./sherpa-onnx-wasm-simd-*.tar.bz2
71 71
  72 + - name: Publish to ModelScope
  73 + env:
  74 + MS_TOKEN: ${{ secrets.MODEL_SCOPE_GIT_TOKEN }}
  75 + uses: nick-fields/retry@v2
  76 + with:
  77 + max_attempts: 20
  78 + timeout_seconds: 200
  79 + shell: bash
  80 + command: |
  81 + SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
  82 +
  83 + git config --global user.email "csukuangfj@gmail.com"
  84 + git config --global user.name "Fangjun Kuang"
  85 +
  86 + rm -rf ms
  87 + export GIT_LFS_SKIP_SMUDGE=1
  88 +
  89 + git clone https://www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-en.git ms
  90 + cd ms
  91 + git fetch
  92 + git pull
  93 + git merge -m "merge remote" --ff origin main
  94 +
  95 + cp -v ../sherpa-onnx-wasm-simd-${SHERPA_ONNX_VERSION}-en-tts/* .
  96 +
  97 + git status
  98 + git lfs track "*.data"
  99 + git lfs track "*.wasm"
  100 + ls -lh
  101 +
  102 + git add .
  103 + git commit -m "update model"
  104 + git push https://oauth2:${MS_TOKEN}@www.modelscope.cn/studios/k2-fsa/web-assembly-tts-sherpa-onnx-en.git
  105 +
72 - name: Publish to huggingface 106 - name: Publish to huggingface
73 env: 107 env:
74 HF_TOKEN: ${{ secrets.HF_TOKEN }} 108 HF_TOKEN: ${{ secrets.HF_TOKEN }}