muhaos / react-native-speech-to-text-ios

React Native speech recognition component for iOS 10+
MIT License
40 stars 9 forks source link

App without audio when return result #11

Closed JoseIgnacio92 closed 7 years ago

JoseIgnacio92 commented 7 years ago

When it returns the result, something is in memory and the application is listening and that causes the phone to have no sound.

Sorry for my English

Thank you.

martinblampied commented 7 years ago

Fixed in https://github.com/muhaos/react-native-speech-to-text-ios/pull/12/commits/82adad8d23a43c277f51f98f8f0933f9a6656ba9

JoseIgnacio92 commented 7 years ago

Thanks for the quick reply. I have not tried your solution yet, because I could solve it in the following way

- [audioSession setCategory:AVAudioSessionCategoryRecord error:&audioSessionError];
+ [audioSession setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:&audioSessionError];