Does Chrome have built-in speech recognition for "x-webkit-speech" input elements? Does Chrome have built-in speech recognition for "x-webkit-speech" input elements? google-chrome google-chrome

Does Chrome have built-in speech recognition for "x-webkit-speech" input elements?


Yup, Chrome does speech recognition via Google's servers. But there's no reason that other browsers couldn't choose to implement it differently (for example using some speech recognition facility in the OS).

Balu, your link is actually a bit out of date. The latest Google proposal can be found here: http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html

Although speech recognition has been available in the Chrome dev channel for some time, it has not shipped yet and we're not yet sure when it will ship. We definitely want people to play with the API and offer feedback on it, but we don't think it's quite ready for prime time yet.


According to the code it sends the audio data as a POST request to:

https://www.google.com/speech-api/v1/recognize?client=chromium&lang=??&lm=??&xhw=??&maxresults=3

lm is grammar in the code, xhw is hardware_info which is optional according to a comment. The audio appears to be speex, x-speex-with-header-byte:

// Encode the frame and place the size of the frame as the first byte. This// is the packet format for MIME type x-speex-with-header-byte.

It looks like it would be pretty trivial to modify the chrome code to use in your own app.

Update:

You also need to get a speech recognition API key and they are limited to 50 requests per day. There is no way to increase that limit - not even by paying.


There is an experimental fork of speexenc that can encode x-speex-with-header-byte MIME binary format, its referenced on the QXIP Wiki and is available on GitHub. Does the job fine by placing the size of the frame as the first byte of packets.