I can managed to record and play back with this code:
@objc func recordAudioButtonTapped(_ sender: UIButton) { if audioRecorder == nil {