Only Google Chrome
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; const recognition = new SpeechRecognition(); recognition.onresult = (event) => { console.log(event.results[0][0].transcript); }; recognition.start();
const speech = new SpeechSynthesisUtterance(); speech.text = 'Hello world'; speech.volume = 1; speech.rate = 1; speech.pitch = 1; speech.lang = 'en-US'; window.speechSynthesis.speak(speech);
Install node
nodejs
http-server
npm i http-server -g