Spaces:
Running
Running
Alex Bacart commited on
main : CSV format export trimmed spaces fix (#444)
Browse files* 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 +0 -3
examples/main/main.cpp
CHANGED
|
@@ -346,9 +346,6 @@ bool output_csv(struct whisper_context * ctx, const char * fname) {
|
|
| 346 |
const int n_segments = whisper_full_n_segments(ctx);
|
| 347 |
for (int i = 0; i < n_segments; ++i) {
|
| 348 |
const char * text = whisper_full_get_segment_text(ctx, i);
|
| 349 |
-
if (text[0] == ' ') {
|
| 350 |
-
text = text + sizeof(char); //whisper_full_get_segment_text() returns a string with leading space, point to the next character.
|
| 351 |
-
}
|
| 352 |
const int64_t t0 = whisper_full_get_segment_t0(ctx, i);
|
| 353 |
const int64_t t1 = whisper_full_get_segment_t1(ctx, i);
|
| 354 |
|
|
|
|
| 346 |
const int n_segments = whisper_full_n_segments(ctx);
|
| 347 |
for (int i = 0; i < n_segments; ++i) {
|
| 348 |
const char * text = whisper_full_get_segment_text(ctx, i);
|
|
|
|
|
|
|
|
|
|
| 349 |
const int64_t t0 = whisper_full_get_segment_t0(ctx, i);
|
| 350 |
const int64_t t1 = whisper_full_get_segment_t1(ctx, i);
|
| 351 |
|