From 3b1960520a390b7d0779401bf7f58e72fbef34e5 Mon Sep 17 00:00:00 2001 From: Alex Bacart <13940752+alex-bacart@users.noreply.github.com> Date: Sat, 4 Feb 2023 09:48:35 +0300 Subject: [PATCH] main : CSV format export trimmed spaces fix (#444) * Update main.cpp Removed string trimming * Update main.cpp * Update main.cpp * Revert "Update main.cpp" This reverts commit d8924fdcfe8a2980db0af47d42ec206fc1a3e9d0. * Revert "Update main.cpp" This reverts commit 252e508d8597231c61380ebea42b3707714345cc. --- examples/main/main.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 68f427c..10d6b3c 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -346,9 +346,6 @@ bool output_csv(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); - if (text[0] == ' ') { - text = text + sizeof(char); //whisper_full_get_segment_text() returns a string with leading space, point to the next character. - } const int64_t t0 = whisper_full_get_segment_t0(ctx, i); const int64_t t1 = whisper_full_get_segment_t1(ctx, i);