简单地说,它非常简单,包含最少的量(只有两行)
但我仍然没有听到任何声音.但谷歌TTS在我的笔记本电脑上完美运行.
当我运行下面的页面时,我只看到"一二"警报.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head>
<body>
<script>
var utterance = new SpeechSynthesisUtterance('Hello baby');
window.speechSynthesis.speak(utterance);
alert("one two");
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我使用Google Chrome版本36.如何在JavaScript中查看错误?非常感谢Stack Overflow!