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

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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