Speech synthesis: Difference between revisions

Update javascript code for browser usage
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(Update javascript code for browser usage)
Line 196:
 
=={{header|JavaScript}}==
This should work in most major browsers
{{works with|Javascript}}
<lang javascript>
var utterance = new SpeechSynthesisUtterance("This is an example of speech synthesis.");
window.speechSynthesis.speak(utterance);
</lang>
 
Windows only:
{{works with|JScript}}
<lang javascript>var voice = new ActiveXObject("SAPI.SpVoice");