have you tried master?
@sibelius yep! It doesn鈥檛 works. If you want, you can try with my code
Can you post the stack trace?
Solved
@under94 how?
You have to edit Voice.m adding the right category of AVAudioSession:
Inside startSpeech you have to add (as first line): [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
Now, inside destroySpeech: [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; So, after speech-to-text you have to call the destroy method, then you can play a sound with react-native-tts.
I don't know if this is the right solution, but for me, it works.
@under94 its work, thank you !
Most helpful comment
You have to edit Voice.m adding the right category of AVAudioSession:
Inside
startSpeechyou have to add (as first line):[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];Now, inside
destroySpeech:[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];So, after speech-to-text you have to call the destroy method, then you can play a sound with react-native-tts.I don't know if this is the right solution, but for me, it works.