Voice: Voice Recognition not working well in iOS , fetch only first word

Created on 10 Oct 2019  路  20Comments  路  Source: react-native-voice/voice

Question Voice Recognition not working well in iOS , fetch only first word after that gives result , fine in android.

Most helpful comment

Same problem, i upgrade my react-native to 0.61.1, to work with fast reload, but now voice recognition not working

All 20 comments

Same problem.

Same problem, i upgrade my react-native to 0.61.1, to work with fast reload, but now voice recognition not working

I'm also having this problem in iOS, while in Android works fine.

Me too, Voice.stop() doesn't call onSpeechEnd !!

We use cancel method to finish recognition but it fails.
In order to make the library work, we filtered the throwed error
onSpeechError = e => { console.log(e); if(e.error.code != 'recognition_fail'){ this.setState({ error: JSON.stringify(e.error), }); } };
And we changed the state of end after canceling
try { await Voice.cancel(); this.setState({ end: true, }); } catch (e) { //eslint-disable-next-line console.error(e); } };

We need further testing on Android if it breaks it downs

Me too, Voice.stop() doesn't call onSpeechEnd !!

do you find any solutions on mine it like after call stop it hang for 5 seconds or more then onSpeechEnd will callback

Same problem here, Voice.stop() doesn't call onSpeechEnd nor does it show FinalResult: true.

@gaurav92-gs Did you solved your problem??

for some reason, I didn't fix anything and when we launch update on our app again (no change in that problem yet) it solves itself -,-

I am having the same issue on iOS real device. My device is using iOS 13.5.1 and React Native 0.63.2 and voice is using 1.1.3. Have you guys solved this issue or found a work around? Android is working fine.

I managed to make this work. I was using hook and accidentally calling destroy() in useEffect after the result is set. Now it is working properly after I updated the flow 馃檪 I followed the codes from this article and managed to make it work. Please be careful that the codes in the article is not complete but can get the idea. https://medium.com/@gilshaan/speech-to-text-conversion-in-react-native-using-hooks-use-usestate-and-useeffect-c2b9de6b8a8a

Thanks @Aung-Myint-Thein for the resource! @gaurav92-gs does this help you out to close the issue?

@Aung-Myint-Thein The source code has same issue on iOS.
Not working totally on iOS. only fetching first word

me too, any update

any update on this problem? im facing this too

Any update on this?

Inside the onSpeechResults function add debounce and check the result.

Inside the onSpeechResults function add debounce and check the result.

What?

Any updates here?

In IOS, it will keep returning results one by one in words. You will have to wait for 1 or 2 secs and then check the result.

Was this page helpful?
0 / 5 - 0 ratings