From 35cde51354d73f41e8b442d53787cb42cd23abc4 Mon Sep 17 00:00:00 2001 From: Pacharapol Withayasakpunt Date: Mon, 24 Oct 2022 17:46:31 +0700 Subject: [PATCH] (output_srt) fix string replace position should be 8 instead of 9 --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 51541c0..3e0dfa3 100644 --- a/main.cpp +++ b/main.cpp @@ -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"; }