Fix publishing apks to huggingface (#1121)

Save APKs for each release in a separate directory.

Huggingface requires that each directory cannot contain more than 1000 files.

Since we have so many tts models and for each model we need to build APKs of 4 different ABIs,
it is a workaround for the huggingface's constraint by placing them into separate directories for different releases.
This commit is contained in:
Fangjun Kuang
2024-07-13 16:14:00 +08:00
committed by GitHub
parent 54e6e962bf
commit b5093e27f9
36 changed files with 123 additions and 60 deletions

View File

@@ -2,6 +2,8 @@ name: apk-asr-2pass
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,19 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p asr-2pass d=asr-2pass/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./asr-2pass/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-asr
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p asr d=asr/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./asr/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-audio-tagging-wearos
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p audio-tagging-wearos d=audio-tagging-wearos/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./audio-tagging-wearos/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-audio-tagging
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'

View File

@@ -2,6 +2,8 @@ name: apk-kws
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -157,14 +159,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p kws d=kws/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./kws/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-speaker-identification
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -98,14 +100,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p speaker-identification d=speaker-identification/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./speaker-identification/ mkdir -p $d/
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-slid
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p slid d=slid/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./slid/ mkdir -p $d/
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-tts-engine
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -161,14 +163,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p tts-engine-2 d=tts-engine-new/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./tts-engine-2/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-tts
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -161,14 +163,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p tts-2 d=tts-new/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./tts-2/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-vad-asr
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -160,14 +162,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p vad-asr d=vad-asr/$SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./vad-asr/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -2,6 +2,8 @@ name: apk-vad
on: on:
push: push:
branches:
- apk
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' - 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -157,14 +159,18 @@ jobs:
export GIT_LFS_SKIP_SMUDGE=1 export GIT_LFS_SKIP_SMUDGE=1
export GIT_CLONE_PROTECTION_ACTIVE=false 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 git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface cd huggingface
git fetch git fetch
git pull git pull
git merge -m "merge remote" --ff origin main git merge -m "merge remote" --ff origin main
mkdir -p vad d=vad/SHERPA_ONNX_VERSION
cp -v ../apks/*.apk ./vad/ mkdir -p $d
cp -v ../apks/*.apk $d/
git status git status
git lfs track "*.apk" git lfs track "*.apk"
git add . git add .

View File

@@ -15,7 +15,7 @@ func main() {
config := sherpa.VadModelConfig{} config := sherpa.VadModelConfig{}
// Please download silero_vad.onnx from // 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.Model = "./silero_vad.onnx"
config.SileroVad.Threshold = 0.5 config.SileroVad.Threshold = 0.5

View File

@@ -3,7 +3,7 @@
set -ex set -ex
if [ ! -f ./silero_vad.onnx ]; then 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 fi
if [ ! -f ./sherpa-onnx-paraformer-trilingual-zh-cantonese-en/model.int8.onnx ]; then if [ ! -f ./sherpa-onnx-paraformer-trilingual-zh-cantonese-en/model.int8.onnx ]; then

View File

@@ -15,7 +15,7 @@ func main() {
config := sherpa.VadModelConfig{} config := sherpa.VadModelConfig{}
// Please download silero_vad.onnx from // 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.Model = "./silero_vad.onnx"
config.SileroVad.Threshold = 0.5 config.SileroVad.Threshold = 0.5

View File

@@ -3,7 +3,7 @@
set -ex set -ex
if [ ! -f ./silero_vad.onnx ]; then 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 fi
if [ ! -f ./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.int8.onnx ]; then if [ ! -f ./sherpa-onnx-whisper-tiny.en/tiny.en-encoder.int8.onnx ]; then

View File

@@ -89,7 +89,7 @@ func createVad() *sherpa.VoiceActivityDetector {
config := sherpa.VadModelConfig{} config := sherpa.VadModelConfig{}
// Please download silero_vad.onnx from // 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.Model = "./silero_vad.onnx"
config.SileroVad.Threshold = 0.5 config.SileroVad.Threshold = 0.5

View File

@@ -11,7 +11,7 @@ if [ ! -f ./sr-data/enroll/fangjun-sr-1.wav ]; then
fi fi
if [ ! -f ./silero_vad.onnx ]; then 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 fi
go mod tidy go mod tidy

View File

@@ -15,7 +15,7 @@ func main() {
config := sherpa.VadModelConfig{} config := sherpa.VadModelConfig{}
// Please download silero_vad.onnx from // 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.Model = "./silero_vad.onnx"
config.SileroVad.Threshold = 0.5 config.SileroVad.Threshold = 0.5

View File

@@ -3,7 +3,7 @@
set -ex set -ex
if [ ! -f ./silero_vad.onnx ]; then 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 fi
if [ ! -f ./sherpa-onnx-whisper-tiny/tiny-encoder.int8.onnx ]; then if [ ! -f ./sherpa-onnx-whisper-tiny/tiny-encoder.int8.onnx ]; then

View File

@@ -13,7 +13,7 @@ func main() {
config := sherpa.VadModelConfig{} config := sherpa.VadModelConfig{}
// Please download silero_vad.onnx from // 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.Model = "./silero_vad.onnx"
config.SileroVad.Threshold = 0.5 config.SileroVad.Threshold = 0.5

View File

@@ -3,7 +3,7 @@
set -ex set -ex
if [ ! -f ./silero_vad.onnx ]; then 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 fi
go mod tidy go mod tidy

View File

@@ -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. Note that you need a non-streaming model for this script.
Please visit 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 to download silero_vad.onnx
For instance, 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 (1) For paraformer
@@ -386,7 +386,7 @@ def main():
print("Started!") print("Started!")
is_silence=False is_silence = False
# TODO(fangjun): Support multithreads # TODO(fangjun): Support multithreads
while True: while True:
# *2 because int16_t has two bytes # *2 because int16_t has two bytes
@@ -394,9 +394,9 @@ def main():
if not data: if not data:
if is_silence: if is_silence:
break 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 # 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 = np.frombuffer(data, dtype=np.int16)
samples = samples.astype(np.float32) / 32768 samples = samples.astype(np.float32) / 32768

View File

@@ -18,12 +18,12 @@ Note that `zh` means Chinese, while `en` means English.
(2) Download the VAD model (2) Download the VAD model
Please visit 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 to download silero_vad.onnx
For instance, 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 (3) Run this script

View File

@@ -38,12 +38,12 @@ Note that `zh` means Chinese, while `en` means English.
(3) Download the VAD model (3) Download the VAD model
Please visit 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 to download silero_vad.onnx
For instance, 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 (4) Please refer to ./generate-subtitles.py
to download a non-streaming ASR model. to download a non-streaming ASR model.

View File

@@ -36,12 +36,12 @@ Note that `zh` means Chinese, while `en` means English.
(3) Download the VAD model (3) Download the VAD model
Please visit 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 to download silero_vad.onnx
For instance, 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 (4) Run this script

View File

@@ -55,7 +55,7 @@ def main():
if not Path(args.silero_vad_model).is_file(): if not Path(args.silero_vad_model).is_file():
raise RuntimeError( raise RuntimeError(
f"{args.silero_vad_model} does not exist. Please download it from " 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 device_name = args.device_name

View File

@@ -38,7 +38,7 @@ def main():
if not Path(args.silero_vad_model).is_file(): if not Path(args.silero_vad_model).is_file():
raise RuntimeError( raise RuntimeError(
f"{args.silero_vad_model} does not exist. Please download it from " 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 mic_sample_rate = 16000

View File

@@ -14,12 +14,12 @@ python3 ./vad-remove-non-speech-segments-alsa.py \
--silero-vad-model silero_vad.onnx --silero-vad-model silero_vad.onnx
Please visit 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 to download silero_vad.onnx
For instance, 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 argparse

View File

@@ -13,12 +13,12 @@ python3 ./vad-remove-non-speech-segments-from-file.py \
output.wav output.wav
Please visit 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 to download silero_vad.onnx
For instance, 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 argparse

View File

@@ -11,12 +11,12 @@ python3 ./vad-remove-non-speech-segments.py \
--silero-vad-model silero_vad.onnx --silero-vad-model silero_vad.onnx
Please visit 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 to download silero_vad.onnx
For instance, 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 argparse

View File

@@ -51,12 +51,12 @@ to install sherpa-onnx and to download non-streaming pre-trained models
used in this file. used in this file.
Please visit 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 to download silero_vad.onnx
For instance, 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 argparse
import sys import sys

View File

@@ -32,11 +32,11 @@ log "====================x86===================="
mkdir -p apks 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 # Download the model
pushd ./android/SherpaOnnxVad/app/src/main/assets/ 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 popd
for arch in arm64-v8a armeabi-v7a x86_64 x86; do for arch in arm64-v8a armeabi-v7a x86_64 x86; do

View File

@@ -30,10 +30,10 @@ This program shows how to use VAD in sherpa-onnx.
device_name device_name
Please download silero_vad.onnx from 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 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 The device name specifies which microphone to use in case there are several
on your system. You can use on your system. You can use

View File

@@ -45,10 +45,10 @@ This program shows how to use a streaming VAD with non-streaming ASR in
sherpa-onnx. sherpa-onnx.
Please download silero_vad.onnx from 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 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 Please refer to ./sherpa-onnx-microphone-offline.cc
to download models for offline ASR. to download models for offline ASR.

View File

@@ -49,10 +49,10 @@ This program shows how to use VAD in sherpa-onnx.
--vad-num-threads=1 --vad-num-threads=1
Please download silero_vad.onnx from 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 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"; )usage";
sherpa_onnx::ParseOptions po(kUsageMessage); sherpa_onnx::ParseOptions po(kUsageMessage);

View File

@@ -82,7 +82,7 @@ class Vad(
} }
// Please visit // 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 // to download silero_vad.onnx
// and put it inside the assets/ // and put it inside the assets/
// directory // directory