text to speech and speech to text in javascript code example
Example 1: how to do text to speech in javascript
var msg = new SpeechSynthesisUtterance();
msg.text = "Hello World";
window.speechSynthesis.speak(msg);
Example 2: javascript voice reader
var msg = new SpeechSynthesisUtterance();
msg.text = "Hello World";
window.speechSynthesis.speak(msg);
Example 3: speech to text in js
$('#start-record-btn').on('click', function(e) {
recognition.start();
});