RosettaCodeData/Task/Speech-synthesis/JavaScript/speech-synthesis-1.js

3 lines
130 B
JavaScript

var utterance = new SpeechSynthesisUtterance("This is an example of speech synthesis.");
window.speechSynthesis.speak(utterance);