JSFiddle - React, Tailwind, and code Playground

by Anand Chowdhary

HTML

<input type="text" id="speechthing" value="How" />
<button onclick="helloWorld();">Speak!</button>
<div id="speechrenderer"></div>

JavaScript

function helloWorld() {
  document.getElementById('speechrenderer').innerHTML = "<iframe src='http://translate.google.com/translate_tts?tl=en&amp;q=" + document.getElementById('speechthing').value + "'></iframe>";
}