     public func audioRecorderEncodeErrorDidOccur(recorder: AVAudioRecorder, error: NSError?) {
 
         print("AudioBot audioRecorderEncodeErrorDidOccur: \(error)")
+
+        AudioBot.cleanRecording()
     }
 }
 

            throw Error.NoFileURL
        }

        let settings: [String: AnyObject] = settings ?? [
            AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
            AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue,


        sharedBot.recordingPeriodicReport = decibelSamplePeriodicReport

        let timeInterval = 1 / decibelSamplePeriodicReport.reportingFrequency
        let timer = NSTimer.scheduledTimerWithTimeInterval(timeInterval, target: sharedBot, selector: "reportRecordingDecibel:", userInfo: nil, repeats: true)
        sharedBot.recordingTimer?.invalidate()
