I want to detect if the browser supports x-webkit-speech
(speech to text in <input>
s) using JavaScript, but it seems impossible. How can I achieve that?
(I want to display a message if the browser or its version does not support it.)
you can check whether the browser has a support for speech like this:
if( document.createElement('input').webkitSpeech==undefined )
{
//no speech support
}
Detect on webkit browser (currently only Chrome) and maybe W3C in future ^_^
if ( !!("webkitSpeechRecognition" in window) || !!("speechRecognition" in window) )
alert("yeah!")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With