Code example for SpeechRecognizer

Methods: stopListening

0
                                RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
                intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Dictaphone");
                intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, "net.willware.Dictaphone");
                recognizer.startListening(intent);
            } else { 
                recognizer.stopListening();
                dictate_button.setText("Dictate");
                dictate_button.setBackgroundColor(WHITE);
            } 
        } else if (v == send_button) {
            Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("message/rfc822");
            intent.putExtra(Intent.EXTRA_EMAIL,
                            new String[]{ email_address.getText().toString() });
            intent.putExtra(Intent.EXTRA_SUBJECT,
                            "Android phone voice recording"); 
            intent.putExtra(Intent.EXTRA_TEXT, results_so_far);
            results_so_far = "";
            try { 
                startActivity(Intent.createChooser(intent, "Send mail..."));
Connect your IDE to all the code out there  Get Codota for Java