surroundings:
windows
Official website at:
https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis
Basics:
var MSG = new new SpeechSynthesisUtterance ( "Test" ); // msg.rate = Speed playback. 4 // msg.pitch tonal pitch = 10 // msg.text = "play text" // msg.volume = 0.5 playback volume window .speechSynthesis.speak (msg);
Based approach:
// Play window.speechSynthesis.speak (); // Pause window.speechSynthesis.pause (); // continue window.speechSynthesis.resume (); // stop window.speechSynthesis.cancel ();
Note: See the official website detailed documentation reference documents (mainly used in the official website)