sandrohanea / whisper.net

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

WithDuration() is not working? #20

Closed LainNya closed 1 year ago

LainNya commented 1 year ago

Hi! I want to transcribe audio for only one duration. When I use both WithOffset() and WithDuration(), Whisper often outputs text that exceeds the duration setting length, is it my problem?

sandrohanea commented 1 year ago

Hello @LainNya, I checked the whisper.cpp underlying library and it seems that as long as the segment is longer than duration, the full segment is retrieved (not only the specified duration).

https://github.com/ggerganov/whisper.cpp/

I recommend you open an issue directly there, as unfortunately, it cannot be fixed from this wrapper: image