tts.cpp merged and working in kcpp!

This commit is contained in:
Concedo
2025-08-17 18:09:28 +08:00
parent 52606e9b1d
commit bcaf379509
5 changed files with 90 additions and 11 deletions
+2 -1
View File
@@ -1389,7 +1389,8 @@ std::vector<std::vector<uint32_t>> kokoro_runner::tokenize_chunks(std::vector<st
int kokoro_runner::generate(std::string prompt, struct tts_response * response, std::string voice, std::string voice_code) {
if (model->voices.find(voice) == model->voices.end()) {
TTS_ABORT("Failed to find Kokoro voice '%s' aborting.\n", voice.c_str());
fprintf(stdout,"\nFailed to find Kokoro voice '%s' aborting.\n", voice.c_str());
return -1;
} else {
// if the language changed then we should change the phonemization voice
if (phmzr->mode == ESPEAK && kctx->voice[0] != voice[0]) {