title: Android Speech to Text conversion: Android Application is receiving repeated words when spoken through Voice input using Android Virtual keyboard
body: <p>Sample Application (Steps):</p>
  
  <ol>
  <li>An Android Application without EditText control.</li>
  <li>The application has an activity that contains a Text View.</li>
  <li>In the onCreate() method of the Activity, Bring the Virtual 
  Keyboard i.e. SoftKeyBoard when the application 
  is launched.</li>
  <li>Press on the Mic (Voice input) button of the virtual keyboard.</li>
  <li>Speak "How are You".</li>
  </ol>
  
  <p>Results of the Voice Input:<br>
  Android application receives the above spoken words in three iterations like,<br>
  "How"<br>
  "are"<br>
  "How are you"</p>
  
  <p>which is in-correct. If You see, the words <strong>"How"</strong> and <strong>"are"</strong> is repeated in the third iteration.</p>
  
  <p>Expected Result:<br>
  Application should receive the spoken words in three iterations like this<br>
  "How"<br>
  "are"<br>
  "you"  </p>
  
  <p>Here is the Sample Application Code:  </p>
  
  <p>public class TestSpeechToText extends Activity {</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_test_url);
      /* Default display keyboard */
      this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_test_url, menu);
      return true;
  }
  
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      return true;
  }
  
  @Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
      return true;
  }
  
  @Override
  public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) {
      String text = event.getCharacters();
      Log.d("Testing", "Text is " + event.toString());
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>In this case, overridden method onKeyMultiple() is called thrice, with text as
  "How", "are" and "How are you"</p>
  
  <p>Note:<br>
  1. There is no EditText control<br>
  2. The xml layout contains only a Text View  </p>
  
  <p>Is anyone aware of this problem? If yes, How it can be resolved?</p>