Skip to content

Commit

Permalink
main : CSV format export trimmed spaces fix (ggerganov#444)
Browse files Browse the repository at this point in the history
* Update main.cpp

Removed string trimming

* Update main.cpp

* Update main.cpp

* Revert "Update main.cpp"

This reverts commit d8924fd.

* Revert "Update main.cpp"

This reverts commit 252e508.
  • Loading branch information
alex-bacart authored and rock3125 committed Feb 21, 2023
1 parent 9494db8 commit 305ebc8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 305ebc8

Please sign in to comment.