小编Sno*_*now的帖子

HTML5语音合成

简单地说,它非常简单,包含最少的量(只有两行)

但我仍然没有听到任何声音.但谷歌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!

javascript html5 text-to-speech

3
推荐指数
1
解决办法
7066
查看次数

标签 统计

html5 ×1

javascript ×1

text-to-speech ×1