Repository navigation
Replies: 1 comment
|
Hmm, ok I decided to do a quick test first and, as I suspected, it is not handling continuous listening on an android device (phone or tablet). I created a simple app to use continuous listening and checked it worked fine on the desktop (all good), then I tried on android devices and it does not work, it recognised the first utterance only and nothing after that. It also kept the microphone on and did not throw any errors, both of which are a concern. Without a way to trap and restart the recognition on android to mimic continuous listening it will be a show stopper for me unfortunately. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
first of all, thank you for this package and for making it available.
I recently created a react voice -based app using Web Speech API that depends on continuous listening and recognition, and it's all working fine....and then I discovered this package! So I am thinking of refactoring my app to use it but before I do that I thought I'd ask about a few things that are critical to the app.
Number one is continuous listening: With Web Speech API I have this working on desktop and mimiced on android and it all works fine. To get it to work on android I had to create a new SpeechRecognition object after each onend event otherwise there would be a "Start has already been called" error thrown, ie I couldn't call start on a previously ended recognition object. I notice when looking through your code that if you have "continuous" true then it will simply call start again if it had been disconnected - this will work on a desktop but not android. So my long-winded question is does this package gracefully handle continuous listening on an android (ignoring the annoying beeping that goes on).
Also my app subscribed to the onresult event and used the interim results and isFinal flag to update the UI. I can see in your code that there is an emitTranscriptChange event but it doesn't seem to expose the isFinal flag. I see I can access the underlying SpeechRecognition object so I am wondering if I can "subscribe" to the onresult event on that or would that break your internal bindings?
I also needed to implement Dice Similarity Coefficient to match the recognised speech with the expected text and I see you have that too in util! :-)
Anyway, just wondering if I should refactor or not. At this stage I am not interested in using polyfills and I am happy to work around the limitations of cross-browser experiences.
All reactions