首页 > 技术文章 > SpeechSynthesisUtterance 不能播放为什么

dabaixiong 2021-01-24 01:15 原文

let msg = new SpeechSynthesisUtterance("你好");msg.rate=4;msg.pitch=10;msg.text="您好赵";msg.volume=1;speechSynthesis.speak(msg);

 

var synth = window.speechSynthesis;
undefined
var voices = synth.getVoices();

msg.voice=voices[16]

推荐阅读