Click here to Skip to main content
16,020,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i am using text to speech in my phonegap app.
if my string content is high its not working..
when it is low it is working somewhat.
how to rectify this ?
this is my code ..
kindly guide me where i am strucking..

C#
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 speed(){
window.plugins.tts.speed(70);
}
<a href="javascript:speak()"></a><a href="javascript:shutdown()">
</a><a href="javascript:speed()"></a>





thanks in advance..
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900