Max len has no effect
Closed this issue · 4 comments
weisrc commented
Hi, I am trying to do word level timestamps, however set_max_len(1)
doesn't do the desired behavior as demonstrated using CLI tool and -ml 1
.
This is the code:
let mut whisper_params = FullParams::new(SamplingStrategy::default());
whisper_params.set_max_len(1);
Thanks!
tazz4843 commented
max_len may only have an effect if you use the raw FFI callbacks to get data. That's the only difference I can see between the default Rust usage and the main example. I have never used the FFI callbacks so can't help much with them.
weisrc commented
Is the raw FFI callback the new segment callback
?
tazz4843 commented
Yes
weisrc commented
Hi, the issue is because I did not set_token_timestamps(true)
.
I get the expected behavior with the following code:
let mut whisper_params = FullParams::new(SamplingStrategy::default());
whisper_params.set_token_timestamps(true);
whisper_params.set_max_len(1);
Closing this as it is resolved.