annyang
annyang copied to clipboard
Support Chrome on Android
This PR implements workarounds for two bugs in SpeechRecognition in Chrome on Android:
-
SpeechRecognition.maxAlternatives
is not respected; 5 alternatives are returned regardless of the attribute value. - Just before
SpeechRecognition.onend()
is called, an extraSpeechRecognitionResultEvent
is triggered whoseresults
attribute contains aSpeechRecognitionResultList
in which thetranscript
of eachitem
is the concatenation oftranscript
s of seemingly random positions in theSpeechRecognitionResultList
s seen since the last time.start()
was called. For example:
Say "blue"
Returned:
1 "blue"
2 "Blu"
3 "Blue"
4 "blew"
5 "Bleu"
Say "yellow"
Returned:
A "yellow"
B "Yello"
C "hello"
D "yelo"
E "Yellow"
Wait for onend() to be triggered
Returned:
1A "blue yellow"
2A "Blu yellow"
3A "Blue yellow"
4A "blew yellow"
1B "blue Yello"
@abrichr Has this been fixed since you posted the issue? I was panning on using this project on Chrome on Android.
@vincentmorneau I haven't been keeping up with this project since I created this PR. Since it hasn't been merged or closed, and a search for android
returns no results, I assume the issue has not been fixed.
It does work using this PR however. I believe the reason that it has not been merged is because I haven't added any tests (as per https://github.com/TalAter/annyang/blob/master/CONTRIBUTING.md#automated-testing).
Try it out and let me know how it goes!
@abrichr Firstly, Thanks for the PR on this Android chrome. :+1:
As per my experience with Android. The problem are:
- A beep sound is ringing every time the mic is turned off and on.
- Android chrome browser is automatically switching the mic off at some random intervals, fortunately for this issue in Annyang we have auto restart.
But this fix is again restarting with a time check. The main issue here is again:
a. User is getting irritated with those beep sounds of 'On' & 'Off' b. If there is a very little command which is being missed with in the span of annyang restart time check.
Can you please tell if these issues were fixed in your PR?
Can confirm. I had to turn down my phone's device volume to get rid of the nagging microphone ping.
The only time I have used getUserMedia for the mic on an android device and not received a beeping is when using the Mumble Web Client. I presume that this has to do with the fact that it is running through Node.JS. https://github.com/Johni0702/mumble-web
I just requested more info from the developer to see if he knows how to get around this.