@SuppressWarnings("ResultOfMethodCallIgnored")
    private void onRecordFailure() {
        recorderState = RECORDER_STATE_FAILURE;
        finishRecord();
    }
Helper class for audio recording and saving as .wav
app/src/main/java/com/cleveroad/example/AudioRecorder.java