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.');
任何線索?謝謝