title: Text to speech not working on android device
body: <p>Below is my code.I am unable to hear the voice in my kitkat device.Toast is appearing but voice is not playing.I am following this tutorial</p>
  
  <p><a href="https://www.tutorialspoint.com/android/android_text_to_speech.htm" rel="nofollow noreferrer">https://www.tutorialspoint.com/android/android_text_to_speech.htm</a></p>
  
  <pre><code>package com.example.insert;
  import android.os.Parcelable;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.app.Activity;
  import android.os.Bundle;
  import android.speech.tts.TextToSpeech;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import java.util.Locale;
  import android.widget.Toast;
  import android.util.Log;
  import java.lang.Object;
  
  
  public class SecondActivity extends AppCompatActivity {
      TextToSpeech t1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_second);
          String emailid;
          emailid = "Hi,say your email id";
  
          t1 = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
              @Override
              public void onInit(int status) {
                  if (status == TextToSpeech.SUCCESS) {
                      int result = t1.setLanguage(Locale.US);
                      if (result == TextToSpeech.LANG_MISSING_DATA
                              || result == TextToSpeech.LANG_NOT_SUPPORTED) {
                          Toast.makeText(getApplicationContext(), "This language is not supported", Toast.LENGTH_SHORT).show();
                      }
                  } else {
                      Toast.makeText(getApplicationContext(), "Initialization failed", Toast.LENGTH_SHORT).show();
                  }
  
              }
          });
  
  
         // Toast.makeText(getApplicationContext(), emailid, Toast.LENGTH_SHORT).show();
          t1.speak(emailid, TextToSpeech.QUEUE_FLUSH, null);
  
      }
  
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          // Don't forget to shutdown tts!
          if (t1 != null) {
              Log.e("TTS","speech on destroy");
              t1.stop();
              t1.shutdown();
          }
      }
  }
  </code></pre>
  
  <p>I have followed this post on stackoverflow.</p>
  
  <p><a href="https://stackoverflow.com/questions/9668224/android-tts-doesnt-speak">Android TTS doesn&#39;t speak</a></p>
  
  <p>But i didn't understand gameover,line and definition_string.</p>
  
  <p>guys help me</p>