Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript SpeechSynthesistTerrance onboundary事件未正确触发_Javascript_Speech Synthesis - Fatal编程技术网

Javascript SpeechSynthesistTerrance onboundary事件未正确触发

Javascript SpeechSynthesistTerrance onboundary事件未正确触发,javascript,speech-synthesis,Javascript,Speech Synthesis,我们正在使用SpeechSynthesistTerrance onboundary事件未正确触发。有时它会停在句子的中间 有人见过这个案子吗?请帮忙 var-outrance=newspeechsynthesisutrance(); lang='en-UK'; 话语率=1; outrance.onboundary=函数(事件){ console.log(事件); };似乎是垃圾收集的问题() 如果将语句存储在具有全局上下文的变量中,则该变量将起作用: window.utterances = [

我们正在使用SpeechSynthesistTerrance onboundary事件未正确触发。有时它会停在句子的中间

有人见过这个案子吗?请帮忙

var-outrance=newspeechsynthesisutrance();
lang='en-UK';
话语率=1;
outrance.onboundary=函数(事件){
console.log(事件);

};似乎是垃圾收集的问题() 如果将语句存储在具有全局上下文的变量中,则该变量将起作用:

window.utterances = [];
var utterance = new SpeechSynthesisUtterance( 'hello' );
utterances.push( utterance );
speechSynthesis.speak( utterance );

“它有时会停在句中”是什么意思?当你的句子中有x个单词时,它只会发射x-n次?如果我们有时在句子中有x个单词,它不会发射x次。我在post方法结果中使用它。你能找到这些方法的共同点吗?你有没有一个每次都会重现的例子?我正在研究angular1.6,在这个应用程序中,我每次都能重现。但在应用程序之外,它每次都会开火。没有英国英语,只有英国英语,这会有所不同吗?。2.也许可以在问题中添加angularjs标记以获得更多视图?