- generate samples for https://k2-fsa.github.io/sherpa/onnx/tts/all/ - provide int8 model for kokoro v0.19 kokoro-int8-en-v0_19.tar.bz2
37 lines
658 B
Bash
Executable File
37 lines
658 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright 2025 Xiaomi Corp. (authors: Fangjun Kuang)
|
|
|
|
set -ex
|
|
|
|
cat > README-new.md <<EOF
|
|
# Introduction
|
|
|
|
Files in this folder are from
|
|
git clone https://huggingface.co/hexgrad/kLegacy
|
|
EOF
|
|
|
|
if [ ! -d kLegacy ]; then
|
|
git clone https://huggingface.co/hexgrad/kLegacy
|
|
pushd kLegacy/v0.19
|
|
git lfs pull
|
|
popd
|
|
fi
|
|
|
|
if [ ! -f ./voices.bin ]; then
|
|
./generate_voices_bin.py
|
|
fi
|
|
|
|
if [ ! -f ./tokens.txt ]; then
|
|
./generate_tokens.py
|
|
fi
|
|
|
|
if [ ! -f ./model.onnx ]; then
|
|
mv kLegacy/v0.19/kokoro-v0_19.onnx ./model.onnx
|
|
fi
|
|
|
|
./add_meta_data.py --model ./model.onnx
|
|
|
|
if [ ! -f model.int8.onnx ]; then
|
|
./dynamic_quantization.py
|
|
fi
|