【发布时间】:2013-07-24 23:25:12
【问题描述】:
我有以下代码:
<!DOCTYPE html>
<meta charset="utf-8">
<title>A HTML Document</title>
<input x-webkit-speech speech><button>Start to recognize voice</button>
如果您在 Chrome 上单击文本框中的麦克风图标,就会开始语音识别。
这就是我想要的:
当我点击按钮元素时,文本框的语音识别开始。
我试过 startSpeechInput (http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html)、SpeechReco (http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/att-1696/speechapi.html#examples) 和 SpeechInputRequest (http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Sep/0033.html),它们都不能在 Chrome 上运行。
我怎样才能做到这一点?
HTML5 Speech Input API 由 Google 提交。除了 Chrome 之外,没有其他浏览器实现了这个 HTML5 规范。现在 HTML5 规范中引入了 3 种方法。但它们都不是由谷歌实现的。我觉得 HTML5 只是 Google 自己的游戏。 Google 应严格执行 HTML5 规范。
【问题讨论】:
标签: html google-chrome speech-recognition voice voice-recognition