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