AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryRecord error:nil];
and this was the problem sometimes session takes time to start and recording was delayed by 3-4sec. So, i created the session in viewdidload and make it global and the problem was resolved.