mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-01 03:28:57 +01:00
main : add csv header (#552)
This commit is contained in:
parent
af005d573f
commit
72af0f5697
@ -352,6 +352,7 @@ bool output_csv(struct whisper_context * ctx, const char * fname) {
|
||||
fprintf(stderr, "%s: saving output to '%s'\n", __func__, fname);
|
||||
|
||||
const int n_segments = whisper_full_n_segments(ctx);
|
||||
fout << "start,end,text\n";
|
||||
for (int i = 0; i < n_segments; ++i) {
|
||||
const char * text = whisper_full_get_segment_text(ctx, i);
|
||||
const int64_t t0 = whisper_full_get_segment_t0(ctx, i);
|
||||
|
Loading…
Reference in New Issue
Block a user