whisper.cpp
whisper.cpp copied to clipboard
Leading space in SRT files?
First, thank you for your awesome project – a great value to society!
I am using the SRT mode output and discovered that a leading space is always added to the output. E.g.:
2
00:00:11,000 --> 00:00:26,000
Tack.
3
00:00:26,000 --> 00:00:36,000
Vi ses imorgon.
I use the SRT output in conjunction with the max length parameter like this:
main -m {model_path} --output-srt --language sv -f audio.wav -ml 72
It seems the leading space could be a bug?
The leading space can be significant if a word is split across multiple SRT entries. For example, with -ml 1, you might see output like:
2
00:00:00,520 --> 00:00:00,570
Per
3
00:00:00,570 --> 00:00:00,680
formed
4
00:00:00,680 --> 00:00:00,890
by
Note that entry 3 doesn't start with a space, indicating that it's a continuation of the previous word.
I agree but I see no lines without a leading space. I will try some more examples.
@peterk
Adding --split-on-word arg to main should be what you are looking for