private void onExit() {
                synchronized (recorderStateMonitor) {
                    recorderState = RECORDER_STATE_IDLE;
                    recorderStateMonitor.notifyAll();
                }
            }
Helper class for audio recording and saving as .wav
app/src/main/java/com/cleveroad/example/AudioRecorder.java