Fix Go tests (#897)
This commit is contained in:
66
.github/workflows/test-go-package.yaml
vendored
66
.github/workflows/test-go-package.yaml
vendored
@@ -149,27 +149,19 @@ jobs:
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-icefall-zh-aishell3"
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
|
||||
tar xvf vits-icefall-zh-aishell3.tar.bz2
|
||||
rm vits-icefall-zh-aishell3.tar.bz2
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-icefall-zh-aishell3*
|
||||
rm -rf vits-icefall-zh-aishell3
|
||||
|
||||
echo "Test vits-piper-en_US-lessac-medium"
|
||||
git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium
|
||||
./run-vits-piper-en_US-lessac-medium.sh
|
||||
rm -rf vits-piper-en_US-lessac-medium
|
||||
|
||||
@@ -194,25 +186,19 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
git clone https://huggingface.co/csukuangfj/vits-zh-aishell3
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-zh-aishell3
|
||||
rm -rf vits-icefall-zh-aishell3
|
||||
|
||||
echo "Test vits-piper-en_US-lessac-medium"
|
||||
git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium
|
||||
./run-vits-piper-en_US-lessac-medium.sh
|
||||
rm -rf vits-piper-en_US-lessac-medium
|
||||
|
||||
@@ -245,25 +231,19 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
git clone https://huggingface.co/csukuangfj/vits-zh-aishell3
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-zh-aishell3
|
||||
|
||||
echo "Test vits-piper-en_US-lessac-medium"
|
||||
git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium
|
||||
./run-vits-piper-en_US-lessac-medium.sh
|
||||
rm -rf vits-piper-en_US-lessac-medium
|
||||
|
||||
@@ -281,33 +261,23 @@ jobs:
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-paraformer-zh-2023-03-28
|
||||
|
||||
echo "Test NeMo CTC"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
./run-nemo-ctc.sh
|
||||
rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
|
||||
echo "Test Whisper tiny.en"
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
|
||||
cd sherpa-onnx-whisper-tiny.en
|
||||
git lfs pull --include "*.onnx"
|
||||
cd ..
|
||||
./run-whisper.sh
|
||||
rm -rf sherpa-onnx-whisper-tiny.en
|
||||
|
||||
echo "Test Tdnn yesno"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
|
||||
./run-tdnn-yesno.sh
|
||||
rm -rf sherpa-onnx-tdnn-yesno
|
||||
|
||||
@@ -328,33 +298,23 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-paraformer-zh-2023-03-28
|
||||
|
||||
echo "Test NeMo CTC"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
./run-nemo-ctc.sh
|
||||
rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
|
||||
echo "Test Whisper tiny.en"
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
|
||||
cd sherpa-onnx-whisper-tiny.en
|
||||
git lfs pull --include "*.onnx"
|
||||
cd ..
|
||||
./run-whisper.sh
|
||||
rm -rf sherpa-onnx-whisper-tiny.en
|
||||
|
||||
echo "Test Tdnn yesno"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
|
||||
./run-tdnn-yesno.sh
|
||||
rm -rf sherpa-onnx-tdnn-yesno
|
||||
|
||||
@@ -383,33 +343,23 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-paraformer-zh-2023-03-28
|
||||
|
||||
echo "Test NeMo CTC"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
./run-nemo-ctc.sh
|
||||
rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
|
||||
echo "Test Whisper tiny.en"
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
|
||||
cd sherpa-onnx-whisper-tiny.en
|
||||
git lfs pull --include "*.onnx"
|
||||
cd ..
|
||||
./run-whisper.sh
|
||||
rm -rf sherpa-onnx-whisper-tiny.en
|
||||
|
||||
echo "Test Tdnn yesno"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
|
||||
./run-tdnn-yesno.sh
|
||||
rm -rf sherpa-onnx-tdnn-yesno
|
||||
|
||||
@@ -424,15 +374,11 @@ jobs:
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
|
||||
@@ -453,15 +399,11 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
|
||||
@@ -491,15 +433,11 @@ jobs:
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
|
||||
|
||||
45
.github/workflows/test-go.yaml
vendored
45
.github/workflows/test-go.yaml
vendored
@@ -59,6 +59,12 @@ jobs:
|
||||
go version
|
||||
go env GOPATH
|
||||
go env GOARCH
|
||||
go env CGO_ENABLED
|
||||
|
||||
- name: Display go env
|
||||
shell: bash
|
||||
run: |
|
||||
go env
|
||||
|
||||
- name: Build sherpa-onnx
|
||||
shell: bash
|
||||
@@ -71,21 +77,26 @@ jobs:
|
||||
cp -v _deps/onnxruntime-src/lib/libonnxruntime*dylib ./lib/
|
||||
|
||||
cd ../scripts/go/_internal/
|
||||
ls -lh lib
|
||||
echo "-----"
|
||||
ls -lh lib/*/
|
||||
echo "-----"
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
- name: Test streaming HLG decoding
|
||||
shell: bash
|
||||
run: |
|
||||
cd scripts/go/_internal/streaming-hlg-decoding/
|
||||
./run.sh
|
||||
|
||||
- name: Test speaker identification
|
||||
shell: bash
|
||||
run: |
|
||||
cd scripts/go/_internal/speaker-identification/
|
||||
./run.sh
|
||||
|
||||
- name: Test streaming HLG decoding
|
||||
shell: bash
|
||||
run: |
|
||||
cd scripts/go/_internal/streaming-hlg-decoding/
|
||||
./run.sh
|
||||
|
||||
- name: Test non-streaming TTS (macOS)
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -101,24 +112,18 @@ jobs:
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
|
||||
tar xvf vits-icefall-zh-aishell3.tar.bz2
|
||||
rm vits-icefall-zh-aishell3.tar.bz2
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-icefall-zh-aishell3
|
||||
|
||||
echo "Test vits-piper-en_US-lessac-medium"
|
||||
git clone https://huggingface.co/csukuangfj/vits-piper-en_US-lessac-medium
|
||||
./run-vits-piper-en_US-lessac-medium.sh
|
||||
rm -rf vits-piper-en_US-lessac-medium
|
||||
|
||||
@@ -142,30 +147,22 @@ jobs:
|
||||
git lfs install
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-paraformer-zh-2023-03-28
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-paraformer-zh-2023-03-28
|
||||
|
||||
echo "Test NeMo CTC"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
./run-nemo-ctc.sh
|
||||
rm -rf sherpa-onnx-nemo-ctc-en-conformer-medium
|
||||
|
||||
echo "Test Whisper tiny.en"
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-whisper-tiny.en
|
||||
cd sherpa-onnx-whisper-tiny.en
|
||||
git lfs pull --include "*.onnx"
|
||||
cd ..
|
||||
./run-whisper.sh
|
||||
rm -rf sherpa-onnx-whisper-tiny.en
|
||||
|
||||
echo "Test Tdnn yesno"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-tdnn-yesno
|
||||
./run-tdnn-yesno.sh
|
||||
rm -rf sherpa-onnx-tdnn-yesno
|
||||
|
||||
@@ -179,22 +176,14 @@ jobs:
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test zipformer2 CTC"
|
||||
wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
rm sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
|
||||
./run-zipformer2-ctc.sh
|
||||
rm -rf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13
|
||||
|
||||
echo "Test transducer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
./run-transducer.sh
|
||||
rm -rf sherpa-onnx-streaming-zipformer-en-2023-06-26
|
||||
|
||||
echo "Test paraformer"
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
|
||||
@@ -31,6 +31,7 @@ func main() {
|
||||
flag.StringVar(&config.ModelConfig.Whisper.Decoder, "whisper-decoder", "", "Path to the whisper decoder model")
|
||||
flag.StringVar(&config.ModelConfig.Whisper.Language, "whisper-language", "", "Language of the input wave. You can leave it empty ")
|
||||
flag.StringVar(&config.ModelConfig.Whisper.Task, "whisper-task", "transcribe", "transcribe or translate")
|
||||
flag.IntVar(&config.ModelConfig.Whisper.TailPaddings, "whisper-tail-paddings", -1, "tail paddings for whisper")
|
||||
|
||||
flag.StringVar(&config.ModelConfig.Tdnn.Model, "tdnn-model", "", "Path to the tdnn model")
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/nemo/english.html#stt-en-conformer-ctc-medium
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to a different offline model if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-nemo-ctc-en-conformer-medium ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
|
||||
tar xvf sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
|
||||
rm sherpa-onnx-nemo-ctc-en-conformer-medium.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-decode-files \
|
||||
--nemo-ctc ./sherpa-onnx-nemo-ctc-en-conformer-medium/model.onnx \
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-paraformer-zh-2023-03-28-chinese
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-paraformer-zh-2023-03-28 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
|
||||
tar xvf sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
|
||||
rm sherpa-onnx-paraformer-zh-2023-03-28.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-decode-files \
|
||||
--paraformer ./sherpa-onnx-paraformer-zh-2023-03-28/model.int8.onnx \
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/yesno/index.html
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-tdnn-yesno ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-tdnn-yesno.tar.bz2
|
||||
tar xvf sherpa-onnx-tdnn-yesno.tar.bz2
|
||||
rm sherpa-onnx-tdnn-yesno.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-decode-files \
|
||||
--sample-rate=8000 \
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-zipformer-en-2023-06-26-english
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to a different offline model if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-streaming-zipformer-en-2023-06-26 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
|
||||
tar xvf sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
|
||||
rm sherpa-onnx-zipformer-en-2023-06-26.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-decode-files \
|
||||
--encoder ./sherpa-onnx-zipformer-en-2023-06-26/encoder-epoch-99-avg-1.onnx \
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/whisper/tiny.en.html
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to a different offline model if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-whisper-tiny.en ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
|
||||
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
|
||||
rm sherpa-onnx-whisper-tiny.en.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-decode-files \
|
||||
--whisper-encoder=./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.onnx \
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#ljspeech-english-single-speaker
|
||||
# to download the model before you run this script
|
||||
set -ex
|
||||
|
||||
if [ ! -d vits-ljs ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-ljs.tar.bz2
|
||||
tar xvf vits-ljs.tar.bz2
|
||||
rm vits-ljs.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-tts \
|
||||
--vits-model=./vits-ljs/vits-ljs.onnx \
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#en-us-lessac-medium-english-single-speaker
|
||||
# to download the model before you run this script
|
||||
set -ex
|
||||
|
||||
if [ ! -d vits-piper-en_US-lessac-medium ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-lessac-medium.tar.bz2
|
||||
tar xvf vits-piper-en_US-lessac-medium.tar.bz2
|
||||
rm vits-piper-en_US-lessac-medium.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./non-streaming-tts \
|
||||
--vits-model=./vits-piper-en_US-lessac-medium/en_US-lessac-medium.onnx \
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#vctk-english-multi-speaker-109-speakers
|
||||
# to download the model before you run this script
|
||||
set -ex
|
||||
|
||||
if [ ! -d vits-vctk ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-vctk.tar.bz2
|
||||
tar xvf vits-vctk.tar.bz2
|
||||
rm vits-vctk.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
for sid in 0 10 108; do
|
||||
./non-streaming-tts \
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
# please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html#aishell3-chinese-multi-speaker-174-speakers
|
||||
# to download the model before you run this script
|
||||
if [ ! -d vits-icefall-zh-aishell3 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
|
||||
tar xvf vits-icefall-zh-aishell3.tar.bz2
|
||||
rm vits-icefall-zh-aishell3.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
for sid in 10 33 99; do
|
||||
./non-streaming-tts \
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#pkufool-icefall-asr-zipformer-streaming-wenetspeech-20230615-chinese
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to different online models if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d icefall-asr-zipformer-streaming-wenetspeech-20230615 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2
|
||||
tar xvf icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2
|
||||
rm icefall-asr-zipformer-streaming-wenetspeech-20230615.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./real-time-speech-recognition-from-microphone \
|
||||
--encoder ./icefall-asr-zipformer-streaming-wenetspeech-20230615/exp/encoder-epoch-12-avg-4-chunk-16-left-128.onnx \
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx
|
||||
fi
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-streaming-paraformer-bilingual-zh-en-chinese-english
|
||||
# to download the model files
|
||||
set -ex
|
||||
|
||||
if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then
|
||||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
git lfs pull --include "*.onnx"
|
||||
cd ..
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
|
||||
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./streaming-decode-files \
|
||||
--paraformer-encoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/encoder.int8.onnx \
|
||||
--paraformer-decoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/decoder.int8.onnx \
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#csukuangfj-sherpa-onnx-streaming-zipformer-en-2023-06-26-english
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to a different online model if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-streaming-zipformer-en-2023-06-26 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
|
||||
rm sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./streaming-decode-files \
|
||||
--encoder ./sherpa-onnx-streaming-zipformer-en-2023-06-26/encoder-epoch-99-avg-1-chunk-16-left-128.onnx \
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Please refer to
|
||||
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-ctc/zipformer-ctc-models.html#sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13-chinese
|
||||
# to download the model
|
||||
# before you run this script.
|
||||
#
|
||||
# You can switch to a different online model if you need
|
||||
set -ex
|
||||
|
||||
if [ ! -d sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13 ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
rm sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
|
||||
fi
|
||||
|
||||
go mod tidy
|
||||
go build
|
||||
|
||||
./streaming-decode-files \
|
||||
--zipformer2-ctc ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/ctc-epoch-20-avg-1-chunk-16-left-128.onnx \
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./silero_vad.onnx ]; then
|
||||
curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./silero_vad.onnx ]; then
|
||||
curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx ]; then
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./silero_vad.onnx ]; then
|
||||
curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ ! -f ./silero_vad.onnx ]; then
|
||||
curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx
|
||||
|
||||
6
scripts/go/_internal/build_darwin_arm64.go
Normal file
6
scripts/go/_internal/build_darwin_arm64.go
Normal file
@@ -0,0 +1,6 @@
|
||||
//go:build darwin && arm64 && !ios
|
||||
|
||||
package sherpa_onnx
|
||||
|
||||
// #cgo LDFLAGS: -L ${SRCDIR}/lib/aarch64-apple-darwin -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-native-fbank-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fstfar -lsherpa-onnx-fst -lpiper_phonemize -lespeak-ng -lucd -lonnxruntime -Wl,-rpath,${SRCDIR}/lib/aarch64-apple-darwin
|
||||
import "C"
|
||||
1
scripts/go/_internal/lib/aarch64-apple-darwin
Symbolic link
1
scripts/go/_internal/lib/aarch64-apple-darwin
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../build/lib
|
||||
@@ -3,9 +3,3 @@ module non-streaming-decode-files
|
||||
go 1.12
|
||||
|
||||
replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../
|
||||
|
||||
require (
|
||||
github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/youpy/go-wav v0.3.2
|
||||
)
|
||||
|
||||
@@ -3,9 +3,3 @@ module real-time-speech-recognition-from-microphone
|
||||
go 1.12
|
||||
|
||||
replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../
|
||||
|
||||
require (
|
||||
github.com/gordonklaus/portaudio v0.0.0-20230709114228-aafa478834f5
|
||||
github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000
|
||||
github.com/spf13/pflag v1.0.5
|
||||
)
|
||||
|
||||
@@ -3,9 +3,3 @@ module streaming-decode-files
|
||||
go 1.12
|
||||
|
||||
replace github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx => ../
|
||||
|
||||
require (
|
||||
github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx v0.0.0-00010101000000-000000000000
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/youpy/go-wav v0.3.2
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user