mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2025-10-17 07:57:43 +02:00
351 B
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)
}