sandrohanea / whisper.net

Whisper.net. Speech to text made simple using Whisper Models
MIT License
534 stars 82 forks source link

.WithMaxTokensPerSegment(1) returns only one segment #24

Open PringlesKing opened 1 year ago

PringlesKing commented 1 year ago

if you specify .WithMaxTokensPerSegment(1) then there will be only one segment in output. Everything is fine in whisper.cpp library.

sandrohanea commented 1 year ago

Hello @PringlesKing , I tried and I can confirm that whisper is stopping the processing after the max tokens is reached in one segment, even if there are multiple segments available.

However, I see the same behavior in the whisper.cpp. How did you manage to use this option in whisper.cpp in order to continue the processing?

Also checked the code and it seems it's always stopping the processing, but maybe I miss something: https://github.com/ggerganov/whisper.cpp/blob/bab97c83d0c9f040bfe1be02c047f272c1a43841/whisper.cpp#L4267