1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-10-17 07:57:43 +02:00
cheatsheets/js-speech.md
Rico Sta. Cruz f75a70bafc
Update
2016-07-06 16:43:31 +08:00

351 B

title, category
title category
JavaScript speech synthesis Ruby
function speak (message) {
  var msg = new SpeechSynthesisUtterance(message)
  var voices = window.speechSynthesis.getVoices()
  msg.voice = voices[0]
  window.speechSynthesis.speak(msg)
}

Reference