speech_recognition icon indicating copy to clipboard operation
speech_recognition copied to clipboard

Fix non-default locale recognition on Android

Open olexale opened this issue 6 years ago • 8 comments

According to documenation EXTRA_LANGUAGE value should be

IETF language tag (as defined by BCP 47), for example "en-US"

So I just replaced Locale with the correct format and that fixed #2 for me. I tested those changes with Android 6 and 8.

olexale avatar Feb 17 '19 06:02 olexale

When it will be merged?

brunohaetinger avatar Mar 26 '19 13:03 brunohaetinger

I can confirm, it works now on Android with the fix by olexale !!!! Big thanks :)

Eimji avatar Mar 27 '19 14:03 Eimji

Confirmed as well, without this fix non-US locales aren't recognized on Android (even the example app does not work as expected). With it they work like a charm.

Gnurou avatar May 30 '19 14:05 Gnurou

Hi, can you please merge this PR and release a new version?

ngocdaothanh avatar Jul 01 '19 12:07 ngocdaothanh

yes i can confirm too that this fix did the trick .

tested with arabic, gj

issam1975 avatar Jul 04 '19 18:07 issam1975

Hi, any chance to merge it?

tsinis avatar Sep 12 '19 08:09 tsinis

Hi @tsinis , You may fork the repository, merge those changes in your fork, and use your custom plugin version, or use already patched version by changing your pubspec.yaml file like that:

speech_recognition:
    git:
      url: git://github.com/olexale/speech_recognition.git

olexale avatar Sep 12 '19 08:09 olexale

Hi @tsinis , You may fork the repository, merge those changes in your fork, and use your custom plugin version, or use already patched version by changing your pubspec.yaml file like that: speech_recognition: git: url: git://github.com/olexale/speech_recognition.git

Hi @olexale Yeah its working, but onRecognitionComplete is never return, and _isListening is always true, in example app... on real Android device (android pie).

P.S. спасибо

tsinis avatar Sep 19 '19 08:09 tsinis