构建接收语音输入的 Chrome 扩展程序
我计划构建一个 Chrome 扩展程序,允许用户通过语音命令导航网页。 为此,我计划将我的语音识别程序放在通过 Chrome 扩展程序与客户端连接的后端服务器上。
是否可以?我知道如何开发扩展程序,但如果您能展示一种接收语音输入的方法,我将不胜感激。
I plan to build a Chrome Extension that allows users to navigate web pages via voice commands.
To do so, I plan to put my speech recognition program on a backend server that connects with clients via Chrome extension.
Is it possible? I know how to develop an extension, but would appreciate if you could show a way of receiving voice input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无需修改 Chrome。
在 HTML5 标签登陆 Chrome 之前,您现在唯一的选择是使用 NPAPI 并将插件包含到您的扩展中。有关详细信息,请访问此页面:
http://code.google.com/chrome/extensions/ npapi.html
You don't need to modify Chrome.
Until the HTML5 tag gets landed in Chrome, your only option right now is to use NPAPI and include the plugin into your Extension. For more information visit this page:
http://code.google.com/chrome/extensions/npapi.html
您必须在 Chromium 中使用 C++ 实现 JavaScript 音频输入 API,并意识到必须通过沙箱传输数据,然后导出后就可以在扩展中使用新的 API。
关于指定音频 API 的大量基础工作已经完成,请在 W3C 上阅读详细信息:
http://chromium.googlecode.com/svn/trunk/samples/audio/specation/specification.html
其中链接到 Chrome 特殊版本的详细信息以及一些已构建的示例:
< a href="http://chromium.googlecode.com/svn/trunk/samples/audio/index.html" rel="nofollow">http://chromium.googlecode.com/svn/trunk/samples/audio/索引.html
You would have to implement a JavaScript audio input API using C++ inside Chromium, being aware that you have to transfer data through the sandbox, then once exported you can use the new API in your extension.
A lot of groundwork has already been done on specifying the audio API, read the details over at W3C:
http://chromium.googlecode.com/svn/trunk/samples/audio/specification/specification.html
Which links to details of a special build of Chrome with some already built samples:
http://chromium.googlecode.com/svn/trunk/samples/audio/index.html