title: Google's Text-To-Speech API from Android app
body: <p>I want to use Google's Text-To-Speech API in an Android app but I only could find the way to do it from web (Chrome). This is my first attempt to play "Hello world" from the app.</p>
  
  <p><code>playTTS</code> is the onClick and it is been executed, but no sound is played. Is there any JS/Java library I need to import? Is it possible to generate an audio file from it?</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      myBrowser = new WebView(this);
      if (savedInstanceState == null) {
          getSupportFragmentManager().beginTransaction()
                  .add(R.id.container, new PlaceholderFragment()).commit();
      }
  }
  
  public void playTTS(View view) {
      myBrowser.loadUrl("javascript:speechSynthesis.speak(
           SpeechSynthesisUtterance('Hello World'))");
  }
  </code></pre>