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

跟風遠走 提交于 2019-11-27 00:46:08

问题


I'm wondering how

<input type="text" x-webkit-speech speech />

Is there a speech recognition enging built into Chrome or is it accessing an underlying speech recognition facility in the operating system?


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


They are using their own API for speech recognition. Ex: sending a post request to there servers.




回答5:


Speech recognition is a proposal by Google. https://docs.google.com/View?id=dcfg79pz_5dhnp23f5

The feature ships with Chrome 8+ and it looks like it sends the data to google servers to perform the actual recognition.




回答6:


This feature now works on chrome 11 beta.

check this out..

http://slides.html5rocks.com/#speech-input




回答7:


This might be of interest https://github.com/taf2/speech2text ruby bindings for the google speech to text API




回答8:


Yes, Chrome does have built-in speech support through WebKit; just look at the Google homepage (which now has a microphone to the right of the search box). I wonder, however, if the Chrome team is working on Omnibox speech support. After all, Chrome is a WebKit-based browser!




回答9:


I just confirmed this on my Chrome Cr-48, it works.




回答10:


There is also a working group that produced http://www.w3.org/TR/xhtml+voice/ but I don't believe this is implemented in any browser except Opera.



来源:https://stackoverflow.com/questions/4361826/does-chrome-have-built-in-speech-recognition-for-x-webkit-speech-input-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!