]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Add newline per segment for text output (#254)
authorLexevolution <redacted>
Sun, 11 Dec 2022 18:00:29 +0000 (04:00 +1000)
committerGitHub <redacted>
Sun, 11 Dec 2022 18:00:29 +0000 (20:00 +0200)
examples/main/main.cpp

index 465d43fb0796455bdfce509ab1a5b661500bb58d..4071bd28fe75d8dd11deffa84754487788ee7e65 100644 (file)
@@ -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;