Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using WhisperProcessor.ProcessAsync more than once #57

Closed
jdluzen opened this issue Jun 1, 2023 · 1 comment
Closed

Using WhisperProcessor.ProcessAsync more than once #57

jdluzen opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jdluzen
Copy link
Contributor

jdluzen commented Jun 1, 2023

Thanks for this great project!
I am attempting to use a WhisperProcessor instance more than once, calling ProcessAsync serially. However, after the first successful recognition, it only sometimes returns SegmentDatas. It appears that OnSegmentHandler is not being called while in whisper_full_with_state.

To work around this, I save the builder and then Build() before every ProcessAsync. Everything gets recognized successfully.

@sandrohanea sandrohanea added the bug Something isn't working label Jun 2, 2023
@sandrohanea
Copy link
Owner

Hello @jdluzen ,
Thanks for reporting the issue.
Indeed, there was a bug in the Process and ProcessAsync methods which was not calling the handlers on subsequential calls.
It will come with the next version of Whisper, but yes, in the meantime, the workaround proposed (to call Build multiple times) should be goon.

Also, if you want to execute multiple transformation in parallel, not only serially => the approach with multiple processors and keeping the builder is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants