webkitSpeechRecognition API usage example
// copy-paste this into a Chrome new tab console and allow mirophone input | |
// when prompted | |
var r = new webkitSpeechRecognition() | |
r.continuous = true | |
r.interimResults = true | |
r.onresult = e => | |
console.log( | |
[...e.results].map( | |
r => r.length > 1 | |
? '[' + [...r].map(a => a.transcript).join('|') + ']' | |
: r[0].transcript).join(' ')) | |
r.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment