title: Android speech To Text Handling
body: <p>in softkeyboard i have the option for speech to text , when i spoke it show a list of suggestion , when i select a text ,i need to fill my editText with this text, how can i done this i have see SpeechRecognizer class ,i don't know how can i use this ,please help me </p>
  
  <pre><code>SpeechRecognizer rec=SpeechRecognizer.createSpeechRecognizer(context);
  
          RecognitionListener listener = new RecognitionListener() {
  
              @Override
              public void onRmsChanged(float rmsdB) {
  
  
              }
  
              @Override
              public void onResults(Bundle results) {
                  ArrayList&lt;String&gt; voiceResults = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
  
  
              }
  
              @Override
              public void onReadyForSpeech(Bundle params) {
                  // TODO Auto-generated method stub
  
              }
  
              @Override
              public void onPartialResults(Bundle partialResults) {
  
  
              }
  
              @Override
              public void onEvent(int eventType, Bundle params) {
  
  
              }
  
              @Override
              public void onError(int error) {
  
  
              }
  
              @Override
              public void onEndOfSpeech() {
  
  
              }
  
              @Override
              public void onBufferReceived(byte[] buffer) {
  
  
              }
  
              @Override
              public void onBeginningOfSpeech() {
  
  
              }
          };
          rec.setRecognitionListener(listener);
  </code></pre>