Js_speech-cheatsheets速查表

SpeechSynthesisUtterance

{: .-one-column}

function speak (message) {
  var msg = new SpeechSynthesisUtterance(message)
  var voices = window.speechSynthesis.getVoices()
  msg.voice = voices[0]
  window.speechSynthesis.speak(msg)
}
speak('Hello, world')

See: SpeechSynthesisUtterance (developer.mozilla.org)


本站为非盈利网站,作品由网友提供上传,如无意中有侵犯您的版权,请联系删除