(output_srt) fix string replace position

should be 8 instead of 9
pull/81/head
Pacharapol Withayasakpunt 3 years ago committed by GitHub
parent 8c7abab0f7
commit 35cde51354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -262,7 +262,7 @@ bool output_srt(struct whisper_context * ctx, const char * fname, const whisper_
const int64_t t1 = whisper_full_get_segment_t1(ctx, i);
fout << i + 1 + params.offset_n << "\n";
fout << to_timestamp(t0).replace(9, 1, ",") << " --> " << to_timestamp(t1).replace(9, 1, ",") << "\n";
fout << to_timestamp(t0).replace(8, 1, ",") << " --> " << to_timestamp(t1).replace(8, 1, ",") << "\n";
fout << text << "\n\n";
}

Loading…
Cancel
Save