Add Koltin and Java API for Kokoro TTS models (#1728)

This commit is contained in:
Fangjun Kuang
2025-01-17 17:36:13 +08:00
committed by GitHub
parent 3a1de0bfc1
commit 99cef4198b
18 changed files with 548 additions and 39 deletions

View File

@@ -39,6 +39,7 @@ model_dir={{ tts_model.model_dir }}
model_name={{ tts_model.model_name }}
acoustic_model_name={{ tts_model.acoustic_model_name }}
vocoder={{ tts_model.vocoder }}
voices={{ tts_model.voices }}
lang={{ tts_model.lang }}
wget -qq https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/$model_dir.tar.bz2
@@ -69,6 +70,9 @@ sed -i.bak s/"modelDir = null"/"modelDir = \"$model_dir\""/ ./MainActivity.kt
sed -i.bak s/"vocoder = null"/"vocoder = \"$vocoder\""/ ./MainActivity.kt
{% endif %}
{% if tts_model.voices %}
sed -i.bak s/"voices = null"/"voices = \"$voices\""/ ./MainActivity.kt
{% endif %}
{% if tts_model.rule_fsts %}
rule_fsts={{ tts_model.rule_fsts }}