title: Convert Speech to Text
body: <p>I want to convert speech to text twice; first for the message and second for the number.</p>
  
  <p>When I speak the text message is displayed but how can I do this with numbers.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      switch (requestCode) {
      case RESULT_SPEECH: {
          if (resultCode == RESULT_OK &amp;&amp; null != data) {
  
              ArrayList&lt;String&gt; text = data
                      .getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
  
              txtText.setText(text.get(0));
              Message_Speak = txtText.getText().toString();
              speaknum.setText(text.get(1));
  
          }
          break;
      }
  
      }
  }
  }
  </code></pre>