speech-and-text-unity-ios-android icon indicating copy to clipboard operation
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

Open calvma opened this issue 4 years ago • 1 comments

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];

calvma avatar Oct 08 '20 15:10 calvma

I am facing the same issue , is there any solution ?

ti-hardikshah avatar Mar 19 '21 12:03 ti-hardikshah