speech-and-text-unity-ios-android
speech-and-text-unity-ios-android copied to clipboard
iOS: pressing record btn in SampleScene freezes scene/game for 0.5s - 1s on actual device
When i press the record btn to start talking on my iphone 6s, everything in the scene freezes for 0.5 - 1s. When I run this same scene in the xcode simulator, there is no timeout/delay.
It looks like creating an AVAudioSession every time we startRecording is causing the issue
AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayAndRecord mode:AVAudioSessionModeMeasurement options:AVAudioSessionCategoryOptionDefaultToSpeaker error:nil]; [session setActive:TRUE withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
I am facing the same issue , is there any solution ?