diff --git a/.github/workflows/apk-asr-2pass.yaml b/.github/workflows/apk-asr-2pass.yaml index 1e781694..8ef5d830 100644 --- a/.github/workflows/apk-asr-2pass.yaml +++ b/.github/workflows/apk-asr-2pass.yaml @@ -2,6 +2,8 @@ name: apk-asr-2pass on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -160,14 +162,19 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p asr-2pass - cp -v ../apks/*.apk ./asr-2pass/ + d=asr-2pass/$SHERPA_ONNX_VERSION + mkdir -p $d + + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-asr.yaml b/.github/workflows/apk-asr.yaml index 69490cc8..177d701c 100644 --- a/.github/workflows/apk-asr.yaml +++ b/.github/workflows/apk-asr.yaml @@ -2,6 +2,8 @@ name: apk-asr on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -160,14 +162,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p asr - cp -v ../apks/*.apk ./asr/ + d=asr/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-audio-tagging-wearos.yaml b/.github/workflows/apk-audio-tagging-wearos.yaml index 577b79ac..548b9028 100644 --- a/.github/workflows/apk-audio-tagging-wearos.yaml +++ b/.github/workflows/apk-audio-tagging-wearos.yaml @@ -2,6 +2,8 @@ name: apk-audio-tagging-wearos on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -160,14 +162,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p audio-tagging-wearos - cp -v ../apks/*.apk ./audio-tagging-wearos/ + d=audio-tagging-wearos/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-audio-tagging.yaml b/.github/workflows/apk-audio-tagging.yaml index efd71037..f811d733 100644 --- a/.github/workflows/apk-audio-tagging.yaml +++ b/.github/workflows/apk-audio-tagging.yaml @@ -2,6 +2,8 @@ name: apk-audio-tagging on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' diff --git a/.github/workflows/apk-kws.yaml b/.github/workflows/apk-kws.yaml index 5629c5d0..f29f5449 100644 --- a/.github/workflows/apk-kws.yaml +++ b/.github/workflows/apk-kws.yaml @@ -2,6 +2,8 @@ name: apk-kws on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -157,14 +159,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p kws - cp -v ../apks/*.apk ./kws/ + d=kws/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-speaker-identification.yaml b/.github/workflows/apk-speaker-identification.yaml index ecaf0697..2ee33e24 100644 --- a/.github/workflows/apk-speaker-identification.yaml +++ b/.github/workflows/apk-speaker-identification.yaml @@ -2,6 +2,8 @@ name: apk-speaker-identification on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -98,14 +100,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p speaker-identification - cp -v ../apks/*.apk ./speaker-identification/ + d=speaker-identification/$SHERPA_ONNX_VERSION + mkdir -p $d/ + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-spoken-language-identification.yaml b/.github/workflows/apk-spoken-language-identification.yaml index ad63dde6..b1d9ef2d 100644 --- a/.github/workflows/apk-spoken-language-identification.yaml +++ b/.github/workflows/apk-spoken-language-identification.yaml @@ -2,6 +2,8 @@ name: apk-slid on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -160,14 +162,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p slid - cp -v ../apks/*.apk ./slid/ + d=slid/$SHERPA_ONNX_VERSION + mkdir -p $d/ + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-tts-engine.yaml b/.github/workflows/apk-tts-engine.yaml index d225df02..0597ddf7 100644 --- a/.github/workflows/apk-tts-engine.yaml +++ b/.github/workflows/apk-tts-engine.yaml @@ -2,6 +2,8 @@ name: apk-tts-engine on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -161,14 +163,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p tts-engine-2 - cp -v ../apks/*.apk ./tts-engine-2/ + d=tts-engine-new/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-tts.yaml b/.github/workflows/apk-tts.yaml index 60ae9c72..5030dd4a 100644 --- a/.github/workflows/apk-tts.yaml +++ b/.github/workflows/apk-tts.yaml @@ -2,6 +2,8 @@ name: apk-tts on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -161,14 +163,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p tts-2 - cp -v ../apks/*.apk ./tts-2/ + d=tts-new/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-vad-asr.yaml b/.github/workflows/apk-vad-asr.yaml index 574b4bf1..6b769412 100644 --- a/.github/workflows/apk-vad-asr.yaml +++ b/.github/workflows/apk-vad-asr.yaml @@ -2,6 +2,8 @@ name: apk-vad-asr on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -160,14 +162,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p vad-asr - cp -v ../apks/*.apk ./vad-asr/ + d=vad-asr/$SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/.github/workflows/apk-vad.yaml b/.github/workflows/apk-vad.yaml index 6d5259a7..6df438fa 100644 --- a/.github/workflows/apk-vad.yaml +++ b/.github/workflows/apk-vad.yaml @@ -2,6 +2,8 @@ name: apk-vad on: push: + branches: + - apk tags: - 'v[0-9]+.[0-9]+.[0-9]+*' @@ -157,14 +159,18 @@ jobs: export GIT_LFS_SKIP_SMUDGE=1 export GIT_CLONE_PROTECTION_ACTIVE=false + SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2) + echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION" + git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface cd huggingface git fetch git pull git merge -m "merge remote" --ff origin main - mkdir -p vad - cp -v ../apks/*.apk ./vad/ + d=vad/SHERPA_ONNX_VERSION + mkdir -p $d + cp -v ../apks/*.apk $d/ git status git lfs track "*.apk" git add . diff --git a/go-api-examples/vad-asr-paraformer/main.go b/go-api-examples/vad-asr-paraformer/main.go index 5311cfb4..7beca779 100644 --- a/go-api-examples/vad-asr-paraformer/main.go +++ b/go-api-examples/vad-asr-paraformer/main.go @@ -15,7 +15,7 @@ func main() { config := sherpa.VadModelConfig{} // Please download silero_vad.onnx from - // https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx + // https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx config.SileroVad.Model = "./silero_vad.onnx" config.SileroVad.Threshold = 0.5 diff --git a/go-api-examples/vad-asr-paraformer/run.sh b/go-api-examples/vad-asr-paraformer/run.sh index 17773f29..6ceb5b6c 100755 --- a/go-api-examples/vad-asr-paraformer/run.sh +++ b/go-api-examples/vad-asr-paraformer/run.sh @@ -3,7 +3,7 @@ set -ex if [ ! -f ./silero_vad.onnx ]; then - curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx + curl -SL -O https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx fi if [ ! -f ./sherpa-onnx-paraformer-trilingual-zh-cantonese-en/model.int8.onnx ]; then diff --git a/go-api-examples/vad-asr-whisper/main.go b/go-api-examples/vad-asr-whisper/main.go index d657aaa8..08a8aef8 100644 --- a/go-api-examples/vad-asr-whisper/main.go +++ b/go-api-examples/vad-asr-whisper/main.go @@ -15,7 +15,7 @@ func main() { config := sherpa.VadModelConfig{} // Please download silero_vad.onnx from - // https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx + // https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx config.SileroVad.Model = "./silero_vad.onnx" config.SileroVad.Threshold = 0.5 diff --git a/go-api-examples/vad-asr-whisper/run.sh b/go-api-examples/vad-asr-whisper/run.sh index 0c4c2f20..29744f10 100755 --- a/go-api-examples/vad-asr-whisper/run.sh +++ b/go-api-examples/vad-asr-whisper/run.sh @@ -3,7 +3,7 @@ set -ex if [ ! -f ./silero_vad.onnx ]; then - curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx + curl -SL -O https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx fi if [ ! -f ./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.int8.onnx ]; then diff --git a/go-api-examples/vad-speaker-identification/main.go b/go-api-examples/vad-speaker-identification/main.go index 317f3755..7a143707 100644 --- a/go-api-examples/vad-speaker-identification/main.go +++ b/go-api-examples/vad-speaker-identification/main.go @@ -89,7 +89,7 @@ func createVad() *sherpa.VoiceActivityDetector { config := sherpa.VadModelConfig{} // Please download silero_vad.onnx from - // https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx + // https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx config.SileroVad.Model = "./silero_vad.onnx" config.SileroVad.Threshold = 0.5 diff --git a/go-api-examples/vad-speaker-identification/run.sh b/go-api-examples/vad-speaker-identification/run.sh index e90c31e3..5c2b4991 100755 --- a/go-api-examples/vad-speaker-identification/run.sh +++ b/go-api-examples/vad-speaker-identification/run.sh @@ -11,7 +11,7 @@ if [ ! -f ./sr-data/enroll/fangjun-sr-1.wav ]; then fi if [ ! -f ./silero_vad.onnx ]; then - curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx + curl -SL -O https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx fi go mod tidy diff --git a/go-api-examples/vad-spoken-language-identification/main.go b/go-api-examples/vad-spoken-language-identification/main.go index 5661897f..57696b7b 100644 --- a/go-api-examples/vad-spoken-language-identification/main.go +++ b/go-api-examples/vad-spoken-language-identification/main.go @@ -15,7 +15,7 @@ func main() { config := sherpa.VadModelConfig{} // Please download silero_vad.onnx from - // https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx + // https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx config.SileroVad.Model = "./silero_vad.onnx" config.SileroVad.Threshold = 0.5 diff --git a/go-api-examples/vad-spoken-language-identification/run.sh b/go-api-examples/vad-spoken-language-identification/run.sh index a5d5b295..465b9661 100755 --- a/go-api-examples/vad-spoken-language-identification/run.sh +++ b/go-api-examples/vad-spoken-language-identification/run.sh @@ -3,7 +3,7 @@ set -ex if [ ! -f ./silero_vad.onnx ]; then - curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx + curl -SL -O https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx fi if [ ! -f ./sherpa-onnx-whisper-tiny/tiny-encoder.int8.onnx ]; then diff --git a/go-api-examples/vad/main.go b/go-api-examples/vad/main.go index 5a96ef3b..b4bc1d87 100644 --- a/go-api-examples/vad/main.go +++ b/go-api-examples/vad/main.go @@ -13,7 +13,7 @@ func main() { config := sherpa.VadModelConfig{} // Please download silero_vad.onnx from - // https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx + // https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx config.SileroVad.Model = "./silero_vad.onnx" config.SileroVad.Threshold = 0.5 diff --git a/go-api-examples/vad/run.sh b/go-api-examples/vad/run.sh index 58b6ead3..12406dc1 100755 --- a/go-api-examples/vad/run.sh +++ b/go-api-examples/vad/run.sh @@ -3,7 +3,7 @@ set -ex if [ ! -f ./silero_vad.onnx ]; then - curl -SL -O https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx + curl -SL -O https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx fi go mod tidy diff --git a/python-api-examples/generate-subtitles.py b/python-api-examples/generate-subtitles.py index 96061425..6488fce9 100755 --- a/python-api-examples/generate-subtitles.py +++ b/python-api-examples/generate-subtitles.py @@ -12,12 +12,12 @@ Supported file formats are those supported by ffmpeg; for instance, Note that you need a non-streaming model for this script. Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx (1) For paraformer @@ -386,7 +386,7 @@ def main(): print("Started!") - is_silence=False + is_silence = False # TODO(fangjun): Support multithreads while True: # *2 because int16_t has two bytes @@ -394,9 +394,9 @@ def main(): if not data: if is_silence: break - is_silence=True + is_silence = True # The converted audio file does not have a mute data of 1 second or more at the end, which will result in the loss of the last segment data - data = np.zeros(1*args.sample_rate,dtype=np.int16) + data = np.zeros(1 * args.sample_rate, dtype=np.int16) samples = np.frombuffer(data, dtype=np.int16) samples = samples.astype(np.float32) / 32768 diff --git a/python-api-examples/speaker-identification-with-vad-dynamic.py b/python-api-examples/speaker-identification-with-vad-dynamic.py index c6cc80bb..a6bfdd8d 100755 --- a/python-api-examples/speaker-identification-with-vad-dynamic.py +++ b/python-api-examples/speaker-identification-with-vad-dynamic.py @@ -18,12 +18,12 @@ Note that `zh` means Chinese, while `en` means English. (2) Download the VAD model Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx (3) Run this script diff --git a/python-api-examples/speaker-identification-with-vad-non-streaming-asr.py b/python-api-examples/speaker-identification-with-vad-non-streaming-asr.py index 0534b80f..760bf65e 100755 --- a/python-api-examples/speaker-identification-with-vad-non-streaming-asr.py +++ b/python-api-examples/speaker-identification-with-vad-non-streaming-asr.py @@ -38,12 +38,12 @@ Note that `zh` means Chinese, while `en` means English. (3) Download the VAD model Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx (4) Please refer to ./generate-subtitles.py to download a non-streaming ASR model. diff --git a/python-api-examples/speaker-identification-with-vad.py b/python-api-examples/speaker-identification-with-vad.py index 8514ed58..613e8137 100755 --- a/python-api-examples/speaker-identification-with-vad.py +++ b/python-api-examples/speaker-identification-with-vad.py @@ -36,12 +36,12 @@ Note that `zh` means Chinese, while `en` means English. (3) Download the VAD model Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx (4) Run this script diff --git a/python-api-examples/vad-alsa.py b/python-api-examples/vad-alsa.py index 259869c0..3a6bf694 100755 --- a/python-api-examples/vad-alsa.py +++ b/python-api-examples/vad-alsa.py @@ -55,7 +55,7 @@ def main(): if not Path(args.silero_vad_model).is_file(): raise RuntimeError( f"{args.silero_vad_model} does not exist. Please download it from " - "https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx" + "https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx" ) device_name = args.device_name diff --git a/python-api-examples/vad-microphone.py b/python-api-examples/vad-microphone.py index 85cde083..c901a490 100755 --- a/python-api-examples/vad-microphone.py +++ b/python-api-examples/vad-microphone.py @@ -38,7 +38,7 @@ def main(): if not Path(args.silero_vad_model).is_file(): raise RuntimeError( f"{args.silero_vad_model} does not exist. Please download it from " - "https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx" + "https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx" ) mic_sample_rate = 16000 diff --git a/python-api-examples/vad-remove-non-speech-segments-alsa.py b/python-api-examples/vad-remove-non-speech-segments-alsa.py index 6d93bb1e..bef27db9 100755 --- a/python-api-examples/vad-remove-non-speech-segments-alsa.py +++ b/python-api-examples/vad-remove-non-speech-segments-alsa.py @@ -14,12 +14,12 @@ python3 ./vad-remove-non-speech-segments-alsa.py \ --silero-vad-model silero_vad.onnx Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx """ import argparse diff --git a/python-api-examples/vad-remove-non-speech-segments-from-file.py b/python-api-examples/vad-remove-non-speech-segments-from-file.py index 21819647..f559e651 100755 --- a/python-api-examples/vad-remove-non-speech-segments-from-file.py +++ b/python-api-examples/vad-remove-non-speech-segments-from-file.py @@ -13,12 +13,12 @@ python3 ./vad-remove-non-speech-segments-from-file.py \ output.wav Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx """ import argparse diff --git a/python-api-examples/vad-remove-non-speech-segments.py b/python-api-examples/vad-remove-non-speech-segments.py index e242801a..0d93c7be 100755 --- a/python-api-examples/vad-remove-non-speech-segments.py +++ b/python-api-examples/vad-remove-non-speech-segments.py @@ -11,12 +11,12 @@ python3 ./vad-remove-non-speech-segments.py \ --silero-vad-model silero_vad.onnx Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx """ import argparse diff --git a/python-api-examples/vad-with-non-streaming-asr.py b/python-api-examples/vad-with-non-streaming-asr.py index c67dd8e8..0a22b9b8 100755 --- a/python-api-examples/vad-with-non-streaming-asr.py +++ b/python-api-examples/vad-with-non-streaming-asr.py @@ -51,12 +51,12 @@ to install sherpa-onnx and to download non-streaming pre-trained models used in this file. Please visit -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx to download silero_vad.onnx For instance, -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx """ import argparse import sys diff --git a/scripts/apk/build-apk-vad.sh b/scripts/apk/build-apk-vad.sh index 8a2f0561..f1d0a29c 100755 --- a/scripts/apk/build-apk-vad.sh +++ b/scripts/apk/build-apk-vad.sh @@ -32,11 +32,11 @@ log "====================x86====================" mkdir -p apks -log "https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx" +log "https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx" # Download the model pushd ./android/SherpaOnnxVad/app/src/main/assets/ -wget -c https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget -c https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx popd for arch in arm64-v8a armeabi-v7a x86_64 x86; do diff --git a/sherpa-onnx/csrc/sherpa-onnx-vad-alsa.cc b/sherpa-onnx/csrc/sherpa-onnx-vad-alsa.cc index 47fa6119..af24350b 100644 --- a/sherpa-onnx/csrc/sherpa-onnx-vad-alsa.cc +++ b/sherpa-onnx/csrc/sherpa-onnx-vad-alsa.cc @@ -30,10 +30,10 @@ This program shows how to use VAD in sherpa-onnx. device_name Please download silero_vad.onnx from -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx For instance, use -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx The device name specifies which microphone to use in case there are several on your system. You can use diff --git a/sherpa-onnx/csrc/sherpa-onnx-vad-microphone-offline-asr.cc b/sherpa-onnx/csrc/sherpa-onnx-vad-microphone-offline-asr.cc index 3a8fb251..c90c29c5 100644 --- a/sherpa-onnx/csrc/sherpa-onnx-vad-microphone-offline-asr.cc +++ b/sherpa-onnx/csrc/sherpa-onnx-vad-microphone-offline-asr.cc @@ -45,10 +45,10 @@ This program shows how to use a streaming VAD with non-streaming ASR in sherpa-onnx. Please download silero_vad.onnx from -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx For instance, use -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx Please refer to ./sherpa-onnx-microphone-offline.cc to download models for offline ASR. diff --git a/sherpa-onnx/csrc/sherpa-onnx-vad-microphone.cc b/sherpa-onnx/csrc/sherpa-onnx-vad-microphone.cc index 832d7775..103cf7c6 100644 --- a/sherpa-onnx/csrc/sherpa-onnx-vad-microphone.cc +++ b/sherpa-onnx/csrc/sherpa-onnx-vad-microphone.cc @@ -49,10 +49,10 @@ This program shows how to use VAD in sherpa-onnx. --vad-num-threads=1 Please download silero_vad.onnx from -https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx For instance, use -wget https://github.com/snakers4/silero-vad/raw/master/files/silero_vad.onnx +wget https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx )usage"; sherpa_onnx::ParseOptions po(kUsageMessage); diff --git a/sherpa-onnx/kotlin-api/Vad.kt b/sherpa-onnx/kotlin-api/Vad.kt index 57198130..c842e035 100644 --- a/sherpa-onnx/kotlin-api/Vad.kt +++ b/sherpa-onnx/kotlin-api/Vad.kt @@ -82,7 +82,7 @@ class Vad( } // Please visit -// https://github.com/snakers4/silero-vad/blob/master/files/silero_vad.onnx +// https://github.com/snakers4/silero-vad/raw/master/src/silero_vad/data/silero_vad.onnx // to download silero_vad.onnx // and put it inside the assets/ // directory