21

I noticed this warning in Chrome devtool's console:

The x-webkit-speech input field attribute is deprecated. Please use the JavaScript API instead.

So what's the best JS API replacement for simple speech input on input fields?

Perhaps there exists a drop-in JS module that will handle it for me?

Web_Designer
  • 72,308
  • 93
  • 206
  • 262
  • 1
    @Teemu I've certainly done some Googling around. – Web_Designer Apr 21 '14 at 00:11
  • 1
    A google search for your error msg verbatim gave this up in about 2 minutes: http://updates.html5rocks.com/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API – enhzflep Apr 21 '14 at 02:25
  • 5
    @enhzflep Yeah, I read that article more than once. It's a nice intro to the web speech API, but nothing close to a drop in replacement for the `x-webkit-speech` attribute. – Web_Designer Apr 21 '14 at 04:10
  • 1
    For the ones, who want to know, why attribute was deprecated: It was a security vulnerability in Chrome till M35: https://blogs.janestreet.com/disabling-chromes-x-webkit-speech-vulnerability/ – Volker E. Aug 20 '14 at 21:12

2 Answers2

14

Answering my own question:

Just made a Github project for this purpose: https://github.com/Daniel-Hug/speech-input

Web_Designer
  • 72,308
  • 93
  • 206
  • 262
7

There is a JavaScript SpeechRecognition API that does text-to-speech and speech-to-text. Not many browsers support it but Chrome should have support.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
0e4ef622
  • 460
  • 4
  • 14