var utterThis = new window.SpeechSynthesisUtterance(str);
window.speechSynthesis.cancel();
window.speechSynthesis.speak(utterThis);
在调用speak之前先调用cancel
微信扫一扫
var utterThis = new window.SpeechSynthesisUtterance(str);
window.speechSynthesis.cancel();
window.speechSynthesis.speak(utterThis);
在调用speak之前先调用cancel
相关推荐