From: Lexevolution Date: Sun, 11 Dec 2022 18:00:29 +0000 (+1000) Subject: Add newline per segment for text output (#254) X-Git-Tag: upstream/1.7.4~1733 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=6ed786957e4878fe8598483d1d3743a8b4480e54;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp Add newline per segment for text output (#254) --- diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 465d43fb..4071bd28 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -266,7 +266,7 @@ bool output_txt(struct whisper_context * ctx, const char * fname) { const int n_segments = whisper_full_n_segments(ctx); for (int i = 0; i < n_segments; ++i) { const char * text = whisper_full_get_segment_text(ctx, i); - fout << text; + fout << text << "\n"; } return true;