code: public static void speechRecognition(final Activity activity, int maxResults, String text) {
  		Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
  		intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
  		intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);
  		intent.putExtra(RecognizerIntent.EXTRA_PROMPT, text);
  		intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);
  		activity.startActivityForResult(intent, 0);
  	}
docs: Start google activity of speechRecognition (needed on
  onActivityResult(int requestCode, int resultCode, Intent data) to call
  getSpeechRecognitionResults() to get the results)
  
  @param activity
  - activity
  @param maxResults
  - Max number of results that you want to get
  @param text
  - what will ask to user when activity start