Skip to content

Commit 66e1e1a

Browse files
committed
tts : fixes
1 parent f766100 commit 66e1e1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/tts/tts.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void fold(const std::vector<double> & data, int64_t n_out, int64_t n_win,
135135
int64_t end = start + kernel_w;
136136

137137
for (int64_t w_im = start; w_im < end; ++w_im) {
138-
if (w_im >= 0 && w_im < output_height) {
138+
if (w_im >= 0 && w_im < output_height && col_idx < (int64_t) data.size()) {
139139
output[w_im] += data[col_idx];
140140
}
141141
col_idx++;
@@ -291,7 +291,7 @@ int main(int argc, char ** argv) {
291291

292292
params.prompt = "";
293293

294-
params.n_predict = 1024;
294+
params.n_predict = 4096;
295295
params.n_batch = 8192;
296296
params.n_ctx = 8192;
297297

@@ -364,7 +364,7 @@ int main(int argc, char ** argv) {
364364
if (c == ' ') {
365365
prompt_clean += "<|text_sep|>";
366366
} else {
367-
if (isalpha(c)) {
367+
if (isalpha(c) || isdigit(c)) {
368368
c = tolower(c);
369369
} else {
370370
continue;

0 commit comments

Comments
 (0)