Add C++ and Python API for Kokoro TTS models. (#1715)
This commit is contained in:
19
.github/scripts/test-python.sh
vendored
19
.github/scripts/test-python.sh
vendored
@@ -267,6 +267,25 @@ log "Offline TTS test"
|
||||
# test waves are saved in ./tts
|
||||
mkdir ./tts
|
||||
|
||||
log "kokoro-en-v0_19 test"
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kokoro-en-v0_19.tar.bz2
|
||||
tar xf kokoro-en-v0_19.tar.bz2
|
||||
rm kokoro-en-v0_19.tar.bz2
|
||||
|
||||
python3 ./python-api-examples/offline-tts.py \
|
||||
--debug=1 \
|
||||
--kokoro-model=./kokoro-en-v0_19/model.onnx \
|
||||
--kokoro-voices=./kokoro-en-v0_19/voices.bin \
|
||||
--kokoro-tokens=./kokoro-en-v0_19/tokens.txt \
|
||||
--kokoro-data-dir=./kokoro-en-v0_19/espeak-ng-data \
|
||||
--num-threads=2 \
|
||||
--sid=10 \
|
||||
--output-filename="./tts/kokoro-10.wav" \
|
||||
"Today as always, men fall into two groups: slaves and free men. Whoever does not have two-thirds of his day for himself, is a slave, whatever he may be a statesman, a businessman, an official, or a scholar."
|
||||
|
||||
rm -rf kokoro-en-v0_19
|
||||
|
||||
log "matcha-ljspeech-en test"
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
|
||||
|
||||
Reference in New Issue
Block a user