Google Has an undocumented REST API to get TextToSpeech
http://translate.google.com/translate_tts?q=your+text+goes+here
Here is the HTML Code. Do not miss to see the screen-cast.
<html> <head> <title> Text To Speech Demo </title> <script> function GetSpeech() { var framehtml="<iframe src=\"http://translate.google.com/translate_tts?q="; framehtml+=escape(document.getElementById("mytext").value); framehtml+="\" </iframe>"; document.getElementById("myframe").innerHTML=framehtml; /*we are done!!!!!*/ /* we will test now*/ /*wow!!!!! its working :) */ } </script> </head> <body> Enter your text Here <textarea id="mytext"> </textarea> <button id="mybutton" onclick="GetSpeech();"> Click me to get the text </button> <div id="myframe"> </div> </body> </html>
Here is a screen-cast
Thanks Guys
Happy Christmas
nice blog!!
ReplyDelete