Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

[Suggestion] Speech Recognition seems to not work on Android #102

Open
jackie-d opened this issue Sep 12, 2019 · 0 comments
Open

[Suggestion] Speech Recognition seems to not work on Android #102

jackie-d opened this issue Sep 12, 2019 · 0 comments

Comments

@jackie-d
Copy link

Hi everybody,
just writing a couple line to help everybody to prevent you to use a shotgun against you computer.

I want to underline, that, on iOs everything seems fine, but on Android it seems to exist an issue that make the feature of this plugin to do not work properly.

It comes out when you implement this for both Android and iOs platforms, because, if you've read the doc and still comes to your mind, you'll remember that on Andorid it's not required to call this.speechRecognition.stopListening(); as the platform detects itself when the speech as ended. In counterpart, on iOs, that method it's mandatory to instruct the platform to stop recording and process the input.

The fact, is that, in realty, in Android, the this.speechRecognition.stopListening(); has a bad counter-effect, as it ends up the recording prematurly so it doesn't have the time to process it, and make the effect of the entire plugin to do not work.

To verify if you're affect, you just have to keep your UI button pushed a bit more, let's say, 1s more, after you stop dictate. With this time margin, you'll see the plugin work good.

In my case, I decided to keep the stopListening method even in Android, but to actually retard the action effect of 1 second, as follow:

       setTimeout(() => {
            this.speechRecognition.stopListening();
        }, 1000);

Smooth as the silk.

Cheers,
Jackie

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant