annyang icon indicating copy to clipboard operation
annyang copied to clipboard

Support Chrome on Android

Open abrichr opened this issue 9 years ago • 5 comments

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 extra SpeechRecognitionResultEvent is triggered whose results attribute contains a SpeechRecognitionResultList in which the transcript of each item is the concatenation of transcripts of seemingly random positions in the SpeechRecognitionResultLists 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 avatar Oct 06 '15 02:10 abrichr

@abrichr Has this been fixed since you posted the issue? I was panning on using this project on Chrome on Android.

vincentmorneau avatar Apr 14 '16 17:04 vincentmorneau

@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 avatar Jun 04 '16 20:06 abrichr

@abrichr Firstly, Thanks for the PR on this Android chrome. :+1:

As per my experience with Android. The problem are:

  1. A beep sound is ringing every time the mic is turned off and on.
  2. 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?

atchyut-re avatar Sep 30 '16 07:09 atchyut-re

Can confirm. I had to turn down my phone's device volume to get rid of the nagging microphone ping.

adushaj avatar May 30 '17 13:05 adushaj

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.

BetaStacks avatar May 30 '17 14:05 BetaStacks