Export kokoro to sherpa-onnx (#1713)

This commit is contained in:
Fangjun Kuang
2025-01-15 16:49:10 +08:00
committed by GitHub
parent ce71b6327a
commit 9efe26a646
7 changed files with 516 additions and 1 deletions

50
scripts/kokoro/run.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/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
https://github.com/thewh1teagle/kokoro-onnx/releases/tag/model-files
Please see also
https://huggingface.co/hexgrad/Kokoro-82M
and
https://huggingface.co/hexgrad/Kokoro-82M/discussions/14
EOF
files=(
kokoro-v0_19_hf.onnx
# kokoro-v0_19.onnx
# kokoro-quant.onnx
# kokoro-quant-convinteger.onnx
voices.json
)
for f in ${files[@]}; do
if [ ! -f ./$f ]; then
curl -SL -O https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/$f
fi
done
models=(
# kokoro-v0_19
# kokoro-quant
# kokoro-quant-convinteger
kokoro-v0_19_hf
)
for m in ${models[@]}; do
./add-meta-data.py --model $m.onnx --voices ./voices.json
done
ls -l
echo "----------"
ls -lh
for m in ${models[@]}; do
./test.py --model $m.onnx --voices-bin ./voices.bin --tokens ./tokens.txt
done
ls -lh