From 1d7c27ca93aa2e016ea754b6f230d1d5015d9613 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 11 Dec 2024 21:42:53 +0200 Subject: [PATCH] tts : fixes --- examples/tts/tts.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tts/tts.cpp b/examples/tts/tts.cpp index b9b2e7f9e..cf04c7060 100644 --- a/examples/tts/tts.cpp +++ b/examples/tts/tts.cpp @@ -135,7 +135,7 @@ static void fold(const std::vector & data, int64_t n_out, int64_t n_win, int64_t end = start + kernel_w; for (int64_t w_im = start; w_im < end; ++w_im) { - if (w_im >= 0 && w_im < output_height) { + if (w_im >= 0 && w_im < output_height && col_idx < (int64_t) data.size()) { output[w_im] += data[col_idx]; } col_idx++; @@ -291,7 +291,7 @@ int main(int argc, char ** argv) { params.prompt = ""; - params.n_predict = 1024; + params.n_predict = 4096; params.n_batch = 8192; params.n_ctx = 8192; @@ -364,7 +364,7 @@ int main(int argc, char ** argv) { if (c == ' ') { prompt_clean += "<|text_sep|>"; } else { - if (isalpha(c)) { + if (isalpha(c) || isdigit(c)) { c = tolower(c); } else { continue;