DEV Community

Discussion on: Text To Speech In 3 Lines Of JavaScript

Collapse
 
asaoluelijah profile image
Asaolu Elijah 🧙‍♂️
var msg = new SpeechSynthesisUtterance();
msg.text = "My browser will say this sentence.";
window.speechSynthesis.speak(msg);