changed 3 years ago
Published Linked with GitHub
tags: ckcsc

Speech Recognition

slides
code


Take a Look

Recognition


Speech Recognition API

MDN


Browser Support

Only Google Chrome


Example

const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; const recognition = new SpeechRecognition(); recognition.onresult = (event) => { console.log(event.results[0][0].transcript); }; recognition.start();

TTS API

Text To Sound
MDN


()

Browser Support

Except IE and Opera, all browser support this api


example

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);

http-server


Install node

Install node
nodejs


Install http-server

http-server
npm i http-server -g


Let's make a voice assistent!

Select a repo