tazz4843 / whisper-rs

Rust bindings to https://github.com/ggerganov/whisper.cpp
The Unlicense
659 stars 108 forks source link

Get shorter segments #96

Closed lucashuguet closed 11 months ago

lucashuguet commented 11 months ago

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.

tazz4843 commented 11 months ago

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".

lucashuguet commented 11 months ago

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.

tazz4843 commented 11 months ago

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

lucashuguet commented 11 months ago

Thanks