Refactor kokoro export (#2302)
- 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
This commit is contained in:
36
scripts/kokoro/v0.19/run.sh
Executable file
36
scripts/kokoro/v0.19/run.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user