var html = ''; var html1=''; var stop = false; function startupWin(result) { // When result is equal to STARTED we are ready to play if (result == TTS.STARTED) { window.plugins.tts.getLanguage(win, fail); // window.plugins.tts.speak("The text to speech service is ready"); } } function win(result) { console.log(result); } function fail(result) { console.log("Error = " + result); } function speak() { var sp= html1.replace(/[^a-zA-Z 0-9.]+/g,''); console.log(sp); window.plugins.tts.speak(sp); } function shutdown() { window.plugins.tts.stop(); } function silence() { window.plugins.tts.silence(86400000); } function home(){ window.location="search.html"; window.plugins.tts.stop(); } function chapter(){ var h=sessionStorage.getItem("previous"); console.log("previous" +h); window.location =h; window.plugins.tts.stop(); } function toggle(el) { if (el.className != "pause") { el.src ='pause.png'; el.className = "pause"; speak(); } else if (el.className == "pause") { el.src = 'play.png'; el.className = "play"; shutdown(); } return false; }
tts.speak
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)