Files
sherpa-onnx/python-api-examples
Mohammad Hijjawi 1bca6ae4e4 Fix malformed SRT timestamps in generate-subtitles.py (#4009)
The timestamps were built as str(timedelta(seconds=t))[:-3]. That only
works when t has a fractional part: for a whole number of seconds
str(timedelta) has no ".ffffff" suffix, so the slice cuts off the
seconds instead, e.g. a segment starting at 0 s was written as
"0:00 --> 0:00:01,500". Hours were also written with a single digit,
while SRT expects HH:MM:SS,mmm.

Format the timestamps explicitly as HH:MM:SS,mmm for both the .srt
and the .txt output.
2026-10-20 17:36:51 +08:00
..
2026-03-12 11:10:55 +08:00

File description