Created
December 8, 2016 02:49
-
-
Save igorcosta/aa17f85602f24a7208f0394f6cff7dc2 to your computer and use it in GitHub Desktop.
speechSynthesis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sayit(text,voice) { | |
var msg = new SpeechSynthesisUtterance(); | |
msg.voice = speechSynthesis.getVoices().filter(v => v.name == voice)[0]; | |
msg.text = text; | |
speechSynthesis.speak(msg); | |
}; sayit ('choice mate!','English UK English Male'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment