Add JavaScript API (WASM) for homophone replacer (#2157)
This commit is contained in:
11
.github/scripts/test-nodejs-npm.sh
vendored
11
.github/scripts/test-nodejs-npm.sh
vendored
@@ -144,7 +144,18 @@ tar xvf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
|
||||
rm sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17.tar.bz2
|
||||
|
||||
node ./test-offline-sense-voice.js
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/dict.tar.bz2
|
||||
tar xf dict.tar.bz2
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/replace.fst
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/test-hr.wav
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/lexicon.txt
|
||||
|
||||
node ./test-offline-sense-voice-with-hr.js
|
||||
|
||||
rm -rf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-2024-07-17
|
||||
rm -rf dict replace.fst test-hr.wav lexicon.txt
|
||||
|
||||
curl -LS -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
|
||||
ls -lh
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04]
|
||||
os: [ubuntu-22.04]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
|
||||
2
.github/workflows/build-wheels-linux.yaml
vendored
2
.github/workflows/build-wheels-linux.yaml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
os: [ubuntu-22.04]
|
||||
python-version: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312", "cp313"]
|
||||
manylinux: [manylinux2014] #, manylinux_2_28]
|
||||
|
||||
|
||||
12
.github/workflows/test-build-wheel.yaml
vendored
12
.github/workflows/test-build-wheel.yaml
vendored
@@ -35,11 +35,11 @@ jobs:
|
||||
matrix:
|
||||
# See https://github.com/actions/runner-images
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.7"
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.8"
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.9"
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.10"
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.12"
|
||||
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
python-version: "3.8"
|
||||
|
||||
- os: macos-13
|
||||
@@ -137,8 +137,8 @@ jobs:
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.12.9/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.13.2/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.12.10/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.13.3/x64/bin:$PATH
|
||||
|
||||
which sherpa-onnx
|
||||
sherpa-onnx --help
|
||||
|
||||
2
.github/workflows/test-nodejs-addon-npm.yaml
vendored
2
.github/workflows/test-nodejs-addon-npm.yaml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, macos-14, ubuntu-20.04, ubuntu-22.04, windows-latest]
|
||||
os: [macos-latest, macos-14, ubuntu-latest, ubuntu-22.04, windows-latest]
|
||||
node-version: ["16", "17", "18", "19", "21", "22"]
|
||||
|
||||
steps:
|
||||
|
||||
12
.github/workflows/test-pip-install.yaml
vendored
12
.github/workflows/test-pip-install.yaml
vendored
@@ -30,11 +30,11 @@ jobs:
|
||||
matrix:
|
||||
# See https://github.com/actions/runner-images
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.7"
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.8"
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.9"
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.10"
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
- os: ubuntu-22.04
|
||||
python-version: "3.13"
|
||||
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
python-version: "3.8"
|
||||
|
||||
- os: macos-13
|
||||
@@ -110,8 +110,8 @@ jobs:
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.12.9/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.13.2/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.12.10/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.13.3/x64/bin:$PATH
|
||||
|
||||
sherpa-onnx --help
|
||||
sherpa-onnx-keyword-spotter --help
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest, macos-14]
|
||||
os: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-14]
|
||||
python-version: ["3.10"]
|
||||
model_type: ["transducer", "paraformer", "nemo_ctc", "whisper", "tdnn"]
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest, macos-14]
|
||||
os: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-14]
|
||||
python-version: ["3.10"]
|
||||
model_type: ["transducer", "paraformer", "zipformer2-ctc"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user