阅读背景:

js/java文字转语音免费(仅仅支持window)支持离线使用_qiaodaima0的博客_java 离线文字转语音

来源:互联网 

直接上html页面就能用

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script type="text/javascript">
	
		function voice(){


        // 语音播报
        var utterThis = new window.SpeechSynthesisUtterance()
			utterThis.text = "支付宝到账100元";  //播放内容按
            window.speechSynthesis.speak(utterThis)



		}

    </script>
</head>
<body>
测试页面

<button id='test' onclick='voice()' >测试</button>
</body>
</html>
<!DOCTYPE html>
<html lan



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: