SpeechRecognition.onaudiostart
Experimental
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The onaudiostart
property of the
SpeechRecognition
interface represents an event handler that will run
when the user agent has started to capture audio (when the audiostart
event
fires.)
Syntax
mySpeechRecognition.onaudiostart = function() { ... };
Examples
var recognition = new SpeechRecognition();
recognition.onaudiostart = function() {
console.log('Audio capturing started');
}
Specifications
Specification | Status | Comment |
---|---|---|
Web Speech API The definition of 'onaudiostart' in that specification. |
Draft |
Browser compatibility
BCD tables only load in the browser
Firefox OS permissions
To use speech recognition in an app, you need to specify the following permissions in your manifest:
"permissions": {
"audio-capture" : {
"description" : "Audio capture"
},
"speech-recognition" : {
"description" : "Speech recognition"
}
}
You also need a privileged app, so you need to include this as well:
"type": "privileged"