ccoreilly / vosk-browser

A speech recognition library running in the browser thanks to a WebAssembly build of Vosk
Apache License 2.0
364 stars 60 forks source link

recognizer.on result never gets called. #30

Closed tab-zero closed 2 years ago

tab-zero commented 2 years ago

I used the react code, and it never calls this piece of code. Is there a parameter to set to enable collecting result?

recognizer.on("result", (message: any) => {
      const { result } = message;
      setUtterances((utt: VoskResult[]) => [...utt, result]);
    });
ccoreilly commented 2 years ago

Are you sure the model is being loaded and audio is being sent? Please share more logs as results should be sent as long as enough audio is being sent to the worker.

ccoreilly commented 2 years ago

@tab-zero Can you share a reproduction script?

ccoreilly commented 2 years ago

Feel free to reopen if you can share a reproduction script.