Voice: Crashes after it prompts to allow Microphone access.

Created on 15 Feb 2018  路  5Comments  路  Source: react-native-voice/voice

I'm on an iPhone 7. It first prompts to allow Speech Recognition, which I accept. Then it prompts to allow Microphone access and while it's doing that, my app just goes away. Subsequent retries just have the app close unexpectedly. It's happening when I call Voice.start('en-US').

Please help!

Thanks,
Alvaro

All 5 comments

Same here

I found that it was because of react-navigation, which was triggering all of the the view actions twice, as well as Voice.start() I manage to fix this problem by adding a check in the beginning of setupAndStartRecognizing to see if the session already had begun.

- (void) setupAndStartRecognizing:(NSString*)localeStr {
    if(self.sessionId){
        return;
    }

@folofse can you send a PR for this?

I found that it was because of react-navigation, which was triggering all of the the view actions twice, as well as Voice.start() I manage to fix this problem by adding a check in the beginning of setupAndStartRecognizing to see if the session already had begun.

- (void) setupAndStartRecognizing:(NSString*)localeStr {
    if(self.sessionId){
        return;
    }

@folofse can tou send a PR for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikodunk picture nikodunk  路  3Comments

blackcoudpm picture blackcoudpm  路  8Comments

inglesuniversal picture inglesuniversal  路  8Comments

MiguelGrability picture MiguelGrability  路  8Comments

jagadhishm87 picture jagadhishm87  路  3Comments