@Override
            public void onError(int error) {
                super.onError(error);
                onStopRecognizing();

            }
Fragment with visualization of speech recognition.
app/src/main/java/com/cleveroad/example/SpeechRecognitionFragment.java