-
Notifications
You must be signed in to change notification settings - Fork 9
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
Better implementation #38
Comments
Hi @joazvsoares ! From what I've tried, onFinalResult() event is called when you call stop() on your vosk instance while it's still recognizing. I hope it helps you |
@riderodd Maybe we could send a onResult() too instead of a onFinalResult() there: What do you think ? |
Hi @kingdcreations! Let's imagine the following use case from the vox-browser-demo project: ![]() When you click on "Speak" the recognition starts, and you can receive This event is called after silence occured but it doesn't mean we want to stop listening/recognizing. As you can see here, we can still receive events from the same recognizer instance:
The issue I see with the current implementation is: The current The role of the start function can be confusing, as it is atypical for a "start" function to also return results. My proposal is to define a start function that purely initiates the process without returning results, introduce a separate function responsible for returning the first result if needed, and also make it up to the client to decide when to close the recognition instance. |
Hi @joazvsoares, Yeah it seems to be a better implementation, I'll work on a pull request for a potential v2 |
onFinalResult
event is never triggered, and I believe this change is the reason since everything is cleaned up on the first result. Does it make sense?
Originally posted by @joazvsoares in #32 (comment)
The text was updated successfully, but these errors were encountered: