tazz4843/whisper-rs

Get shorter segments

lucashuguet opened this issue · 4 comments

I use this repo to generate subtitles for some videos but with the length of the generated segments I get, the subtitles take up the whole screen.
I tried to change the params parameters but without success, maybe because I used experimental parameters.

Is it possible to reduce the length of the segments? Any help would be greatly appreciated.

About the only thing that really exists is FullParams::set_single_segment. This tries to force each word into its own segment, so it's either "all or nothing".

In fact, it made the segments longer. So there's no way to get FullParams::set_max_len or FullParams::set_max_tokens to work properly? Because FullParams::set_max_len doesn't work at all and FullParams::set_max_tokens sort of works, but only splits the segment and omits a part of the video.

Everything is passed to whisper.cpp. There's nothing we can do about it, you'd be best served by opening an issue upstream.

Thanks