voice icon indicating copy to clipboard operation
voice copied to clipboard

Not working with Android 8.0 or later

Open minhnbh opened this issue 6 years ago • 17 comments

I developed application with react-native-voice successfully on Android Device have Android version 7.0 but I can not recognize voice on Android Devices have Android version 8.0 or later. Although I asked for permission RECORD_AUDIO, but I still can not recognize voice.

Any other way to start voice recognition on Android Devices with Android version 8.0 or later?

minhnbh avatar Jan 07 '19 03:01 minhnbh

Any update on this?

emjaynotmj avatar Jan 12 '19 06:01 emjaynotmj

Yeah, would be great to make it work on Android

maslianok avatar Feb 05 '19 10:02 maslianok

I too cannot make this work, and I'd appreciate being able to use this package since it is nicely set up

booellean avatar Mar 09 '19 02:03 booellean

Still here hoping for updates

lucacastagnotto avatar Apr 04 '19 12:04 lucacastagnotto

To solve that problem you need to pass the following config to the .start method:

Voice.start('es_US', {
  "RECOGNIZER_ENGINE": "GOOGLE",
   "EXTRA_PARTIAL_RESULTS": true
})

Tested on Android 9 on Xiaomi Mi9

Goye avatar Apr 22 '19 22:04 Goye

@Goye Doesn't work for me. Anyone else tried that?

lucacastagnotto avatar May 03 '19 13:05 lucacastagnotto

I mean, how is it possible i see people using this library on Android while i can't make it work? If i bind onSpeechStart, i get "Error: 8/recognitionservicebusy", if i don't it always responds "6/No speech input" at first try and "2/Network error" at the following attempts until i re-run the app. I tried so many times making little differences but unsuccessfuly and the only curious thing i saw, is that running https://github.com/wenkesj/react-native-voice/blob/master/VoiceTest/src/VoiceTest.js with just little syntax adjustments, when i start recognition, it triggers "onSpeechVolumeChange" many times, sometimes it's five, sometimes it's 20/30+ or more. I'm on Android 8, using Nexus_5x emulator, react-native version >=58.6. Please, if anyone can provide me a full project that works on Android (on ios worked fine last time i tried), i would appreciate a lot.

lucacastagnotto avatar May 14 '19 12:05 lucacastagnotto

@Goye Doesn't work for me. Anyone else tried that?

@Goye This solution works for me, thanks! @lucacastagnotto Make sure you have google speech engine installed on your device. The solution works for me only after I installed google assistant. Before that, it didn't work.

vincentlux avatar Jun 11 '19 15:06 vincentlux

@Goye @vincentlux Eventually i made it work! I took so many actions that i don't know which actually was needed, but for sure it was crucial toggle on "Virtual michrophone uses host audio input" in emulator michrophone settings. Until that, it didn't work even with your suggestions. Thank you for your help, i really appreciated.

lucacastagnotto avatar Jun 12 '19 12:06 lucacastagnotto

it`s working in 9.0 also.

VarikuntlaSubbarao avatar Sep 03 '19 11:09 VarikuntlaSubbarao

@minhnbh Did you solved your problem?

lfoliveir4 avatar Dec 16 '19 12:12 lfoliveir4

It can be through cookies on android try install on other device or emulator and try again it should help!

jaroslav009 avatar Aug 29 '20 17:08 jaroslav009

It can be through cookies on android try install on other device or emulator and try again it should help!

jaroslav009 avatar Aug 29 '20 17:08 jaroslav009

It's still not working! Any solution please :(

minhnbh avatar Feb 22 '21 06:02 minhnbh

Hm yeah this issue has been open for a while. Does someone have a reproducible repro that I can check out?

safaiyeh avatar Feb 22 '21 17:02 safaiyeh

@Goye Doesn't work for me. Anyone else tried that?

@Goye This solution works for me, thanks! @lucacastagnotto Make sure you have google speech engine installed on your device. The solution works for me only after I installed google assistant. Before that, it didn't work.

what if end user don't have google assistant ? can we run without google assistant?

nileshyadav326 avatar Jul 20 '21 12:07 nileshyadav326

@Goye Doesn't work for me. Anyone else tried that?

@Goye This solution works for me, thanks! @lucacastagnotto Make sure you have google speech engine installed on your device. The solution works for me only after I installed google assistant. Before that, it didn't work.

what if end user don't have google assistant ? can we run without google assistant?

@Goye how youtube search works.

nileshyadav326 avatar Jul 20 '21 12:07 nileshyadav326