Search code examples
javascriptspeech-to-text

Detect x-webkit-speech?


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.)


Solution

  • you can check whether the browser has a support for speech like this:

    if( document.createElement('input').webkitSpeech==undefined )
    {
      //no speech support
    }