HTML5 之音频合成(SpeechSynthesis)
SpeechSynthesisVoice - Web APIs | MDN (mozilla.org)
var synUtterance = new window.SpeechSynthesisUtterance(); synUtterance.text = "批次:L11DXS7509457,欠料预警."; synUtterance.lang = "zh-CN"; synUtterance.pitch = 2; //音调高低0~2,默认1 synUtterance.rate = 1; window.speechSynthesis.speak(synUtterance);
posted on 2021-11-06 14:51 springsnow 阅读(240) 评论(0) 编辑 收藏 举报