var synth = window.speechSynthesis;
var voices = new window.SpeechSynthesisUtterance();
voices.lang = "zh-CN";
需要播放的时候直接设置 voices的text属性的内容,然后调用 speak 函数传入voices对象即可,如下:
voices.text="今儿,天儿不错!"
synth.speak(voices)
了解 工作生活心情记忆 的更多信息
Subscribe to get the latest posts sent to your email.