diff --git a/src/whisper.cpp b/src/whisper.cpp index 492a0999e86..b24e543e7b8 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -6258,11 +6258,15 @@ int whisper_full_with_state( } } text = ""; + t0 = t1; while (i < (int) tokens_cur.size() && tokens_cur[i].id > whisper_token_beg(ctx)) { + if (params.print_special) { + text += whisper_token_to_str(ctx, tokens_cur[i].id); + } + t0 = seek + 2 * (tokens_cur[i].tid - whisper_token_beg(ctx)); i++; } i--; - t0 = t1; i0 = i + 1; speaker_turn_next = false; } @@ -6279,8 +6283,8 @@ int whisper_full_with_state( printf("[%s --> %s] %s\n", to_timestamp(tt0).c_str(), to_timestamp(tt1).c_str(), text.c_str()); } else { printf("%s", text.c_str()); - fflush(stdout); } + fflush(stdout); } result_all.push_back({ tt0, tt1, text, {} , speaker_turn_next });