使用phonegap在文本到语音中使用my(字符串空间)的问题 [英] Problem with my ( string space ) in text to speech using phonegap
本文介绍了使用phonegap在文本到语音中使用my(字符串空间)的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨我在我的phonegap应用程序中使用文本到语音。
如果我的字符串内容很高它不起作用..
当它低时它工作有点。
怎么纠正这个?
这是我的代码..
请指导我在哪里拍...
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..
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..
推荐答案
这篇关于使用phonegap在文本到语音中使用my(字符串空间)的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文