end event fired immediatly after start on SpeechRecognition API

173 Views Asked by At

The onend callback is being called immediately after start() is called on SpeechRecognition, causing the voice recognition to never work:

timestamp = Date.now()
speech = new webkitSpeechRecognition()
speech.onend = () => console.log('ended after', Date.now() - timestamp, 'ms')
speech.start() // immediately logs "ended"

Log results

This has been tested with Chromium: Version 102.0.5005.115 (Build officiel) snap (64 bits) on Ubuntu 20.04.

Am I missing something?

0

There are 0 best solutions below