From 390fd7fa215aa2633596f3bc9395cdf4a6b89919 Mon Sep 17 00:00:00 2001 From: Pacharapol Withayasakpunt Date: Mon, 24 Oct 2022 16:35:07 +0700 Subject: [PATCH] fix srt timestamp to use commer --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index fd1e89e..a435a09 100644 --- a/main.cpp +++ b/main.cpp @@ -239,7 +239,7 @@ bool output_vtt(struct whisper_context * ctx, const char * fname) { const int64_t t0 = whisper_full_get_segment_t0(ctx, i); const int64_t t1 = whisper_full_get_segment_t1(ctx, i); - fout << to_timestamp(t0) << " --> " << to_timestamp(t1) << "\n"; + fout << to_timestamp(t0).replace() << " --> " << to_timestamp(t1) << "\n"; fout << text << "\n\n"; } @@ -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) << " --> " << to_timestamp(t1) << "\n"; + fout << to_timestamp(t0).replace(9, 1, ",") << " --> " << to_timestamp(t1).replace(9, 1, ",") << "\n"; fout << text << "\n\n"; }