Skip to content
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
index.html
minimal.html
script.js
style.css

README.md

Speech Recognition Example

You need Google Chrome (2019-04-09).

Basic code

You can try this code in console.

// initialize
const sr = new webkitSpeechRecognition();
 
// show result
sr.addEventListener('result', (event) => {
  const text = event.results[0][0].transcript;
  console.log(text);
});
 
// start listening
sr.start();

The recognition seems to stop automatically when you finish speaking.

You can’t perform that action at this time.