Html Chrome 是否具有针对“x-webkit-speech”输入元素的内置语音识别功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4361826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does Chrome have built-in speech recognition for "x-webkit-speech" input elements?
提问by Tickle Me Elmo
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?
Chrome 中是否内置了语音识别功能,或者它是否访问操作系统中的底层语音识别功能?
回答by jorlow
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).
是的,Chrome 通过 Google 的服务器进行语音识别。但是没有理由其他浏览器不能选择以不同的方式实现它(例如在操作系统中使用一些语音识别功能)。
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
Balu,您的链接实际上有点过时了。最新的谷歌提案可以在这里找到: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 notshipped 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.
虽然语音识别在 Chrome 开发者频道中已经有一段时间了,但它尚未发货,我们还不确定它何时发货。我们当然希望人们使用 API 并提供有关它的反馈,但我们认为它尚未准备好迎接黄金时段。
回答by Timmmm
According to the code it sends the audio data as a POST request to:
根据代码,它将音频数据作为 POST 请求发送到:
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:
lm
是grammar
在代码,xhw
是hardware_info
根据注释,其是可选的。音频似乎是 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.
看起来修改要在您自己的应用程序中使用的 chrome 代码非常简单。
Update:
更新:
You also need to get a speech recognition API keyand they are limited to 50 requests per day. There is no way to increase that limit - not even by paying.
您还需要获得一个语音识别 API 密钥,并且它们每天限制为 50 个请求。没有办法增加这个限制——甚至不能通过支付。
回答by ciju
They are using their own API for speech recognition. Ex: sending a post request to there servers.
他们使用自己的 API 进行语音识别。例如:向那里的服务器发送发布请求。
回答by Mike Z.
There is an experimental fork of speexenc that can encode x-speex-with-header-byte MIME binary format, its referenced on the QXIP Wikiand is available on GitHub. Does the job fine by placing the size of the frame as the first byte of packets.
有一个 speexenc 的实验性分支,可以编码 x-speex-with-header-byte MIME 二进制格式,它在QXIP Wiki上被引用,并且可以在GitHub上找到。通过将帧的大小作为数据包的第一个字节来完成工作。
回答by Jay
This feature now works on chrome 11 beta.
此功能现在适用于 chrome 11 beta。
check this out..
看一下这个..
回答by todd
This might be of interest https://github.com/taf2/speech2textruby bindings for the google speech to text API
这可能 对谷歌语音到文本 API 的https://github.com/taf2/speech2textruby bindings感兴趣
回答by balu
Speech recognition is a proposal by Google. https://docs.google.com/View?id=dcfg79pz_5dhnp23f5
语音识别是谷歌的提议。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.
该功能随 Chrome 8+ 一起提供,看起来它会将数据发送到谷歌服务器以执行实际识别。
回答by Kenny Strawn
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!
是的,Chrome 确实通过 WebKit 内置了语音支持;只需查看 Google 主页(现在搜索框右侧有一个麦克风)。但是,我想知道 Chrome 团队是否正在研究 Omnibox 语音支持。毕竟,Chrome 是一个基于 WebKit 的浏览器!
回答by Michael Levy
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.
还有一个制作http://www.w3.org/TR/xhtml+voice/的工作组,但我不相信这是在除 Opera 之外的任何浏览器中实现的。
回答by Kevin Ciesielski
I just confirmed this on my Chrome Cr-48, it works.
我刚刚在我的 Chrome Cr-48 上确认了这一点,它有效。