Using speech-to-text in non-WebKit browsers

后端 未结 3 2068
Happy的楠姐
Happy的楠姐 2021-01-13 21:15

By applying the x-webkit-speech attrtibute to an element, you can let WebKit browsers like Chrome use speech-to-text.

相关标签:
3条回答
  • 2021-01-13 21:17

    Chrome is the only desktop browser I'm aware of which currently implements speech input. Might also work in the Android browser, but I'm not sure. It's definitely not implemented in Safari.

    0 讨论(0)
  • 2021-01-13 21:17

    x-webkit-speech is now deprecated. We should use

    var recognition = new webkitSpeechRecognition();
    recognition.onresult = function(event) { 
      console.log(event) 
    }
    recognition.start();
    

    Both firefox & Edge are developing speechRecognition()

    http://caniuse.com/#feat=speech-recognition

    0 讨论(0)
  • 2021-01-13 21:35

    I think this feature is only implemented in Chrome for Win/Mac/Android. That's because it's invented by Google and relies on Google's server to do the voice recognition. Any other browsers who want to implement this feature need to acquire voice recognition technology or work with a partner who has this technology. Thus I don't think this feature will be widely implemented in the near future.

    0 讨论(0)
提交回复
热议问题