0
尝试将语音从native
更改为Google US English
,但没有成功。这是我使用的代码:SpeechSynthesis话语使用其他语音而不是原生
https://jsfiddle.net/uv2k0qws/
function speak(text) {
var msg = new SpeechSynthesisUtterance();
var voices = speechSynthesis.getVoices();
msg.volume = 1;
msg.rate = 1;
msg.pitch = 2;
msg.text = text;
msg.lang = "en-US";
msg.name = "Google US English";
msg.voiceURI = "Google US English"
speechSynthesis.speak(msg);
}
speak('Attention! This is a test.');
任何线索?谢谢