-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add C++ runtime for Tele-AI/TeleSpeech-ASR (#970)
- Loading branch information
1 parent
f8dbc10
commit fd5a0d1
Showing
52 changed files
with
1,050 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: build-wheels-macos-universal2 | ||
|
||
on: | ||
push: | ||
branches: | ||
- wheel | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
env: | ||
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1 | ||
|
||
concurrency: | ||
group: build-wheels-macos-universal2-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_wheels_macos_universal2: | ||
name: ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest] | ||
python-version: ["cp38", "cp39", "cp310", "cp311", "cp312"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: "${{ matrix.python-version}}-* " | ||
CIBW_ENVIRONMENT: SHERPA_ONNX_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'" | ||
CIBW_ARCHS: "universal2" | ||
CIBW_BUILD_VERBOSITY: 3 | ||
|
||
# Don't repair macOS wheels | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" | ||
|
||
- name: Display wheels | ||
shell: bash | ||
run: | | ||
ls -lh ./wheelhouse/ | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-${{ matrix.python-version }} | ||
path: ./wheelhouse/*.whl | ||
|
||
- name: Publish to huggingface | ||
if: matrix.python-version == 'cp38' | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
uses: nick-fields/retry@v3 | ||
with: | ||
max_attempts: 20 | ||
timeout_seconds: 200 | ||
shell: bash | ||
command: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
rm -rf huggingface | ||
export GIT_LFS_SKIP_SMUDGE=1 | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface | ||
cd huggingface | ||
git fetch | ||
git pull | ||
git merge -m "merge remote" --ff origin main | ||
cp -v ../wheelhouse/*.whl . | ||
git status | ||
git add . | ||
git commit -m "add more wheels" | ||
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-wheels main | ||
- name: Publish wheels to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python3 -m pip install --break-system-packages --upgrade pip | ||
python3 -m pip install --break-system-packages wheel twine setuptools | ||
twine upload ./wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,49 @@ jobs: | |
repo_name: k2-fsa/sherpa-onnx | ||
repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} | ||
tag: asr-models | ||
|
||
- name: Publish float32 model to huggingface | ||
shell: bash | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
run: | | ||
src=scripts/tele-speech/sherpa-onnx-telespeech-ctc-zh-2024-06-04 | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-telespeech-ctc-zh-2024-06-04 hf | ||
cp -a $src/* hf/ | ||
cd hf | ||
git lfs track "*.pdf" | ||
git lfs track "*.onnx" | ||
git add . | ||
git commit -m 'add model files' || true | ||
git status | ||
ls -lh | ||
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-telespeech-ctc-zh-2024-06-04 main || true | ||
rm -rf hf | ||
- name: Publish int8 model to huggingface | ||
shell: bash | ||
env: | ||
HF_TOKEN: ${{ secrets.HF_TOKEN }} | ||
run: | | ||
src=scripts/tele-speech/sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04 | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
rm -rf hf | ||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04 hf | ||
cp -a $src/* hf/ | ||
cd hf | ||
git lfs track "*.pdf" | ||
git lfs track "*.onnx" | ||
git add . | ||
git commit -m 'add model files' || true | ||
git status | ||
ls -lh | ||
git push https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-telespeech-ctc-int8-zh-2024-06-04 main || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,14 +30,12 @@ concurrency: | |
|
||
jobs: | ||
test-go: | ||
name: ${{ matrix.os }} ${{matrix.arch }} | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: macos-latest | ||
arch: amd64 | ||
os: [macos-latest, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -47,7 +45,7 @@ jobs: | |
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-${{ matrix.arch }} | ||
key: ${{ matrix.os }}-go | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -109,8 +107,6 @@ jobs: | |
go build | ||
ls -lh | ||
git lfs install | ||
echo "Test vits-ljs" | ||
./run-vits-ljs.sh | ||
rm -rf vits-ljs | ||
|
@@ -144,7 +140,13 @@ jobs: | |
go build | ||
ls -lh | ||
git lfs install | ||
echo "Test telespeech ctc" | ||
./run-telespeech-ctc.sh | ||
rm -rf sherpa-onnx-telespeech-ctc-* | ||
echo "Test transducer" | ||
./run-transducer.sh | ||
rm -rf sherpa-onnx-zipformer-en-2023-06-26 | ||
echo "Test transducer" | ||
./run-transducer.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,3 +106,4 @@ node_modules | |
package-lock.json | ||
sherpa-onnx-nemo-* | ||
sherpa-onnx-vits-* | ||
sherpa-onnx-telespeech-ctc-* |
Oops, something went wrong.