有没有办法在HTML 5语音输入API中使用语法? [英] Is there a way to use a grammar with the HTML 5 speech input API?
问题描述
我正在使用HTML 5语音输入API,并且希望让服务器知道哪些答案可以从语音输入中返回。有没有办法设置可能的输入列表?
在谷歌浏览器中你还不能使用语法,总的来说他们决定仅使用自由格式识别。相关问题是 Google语音API中的语法。
如果您的浏览器支持HTML5音频,您可能需要尝试使用 Pocketsphinx.js 库,它提供了基于javascript的识别器,对于语法来说应该非常好。
I'm working with the HTML 5 speech input API and I want to let the server know which answers it can expect to be returned from the speech input. Is there a way to set a list of possible inputs?
In Google Chrome you can not use grammars yet, overall they decided to use free-form recognition only. Relevant question is Grammar in Google speech API.
Grammars are supported in Firefox Web Speech API, but the feature is experimental.
If your browser supports HTML5 audio, you might want to try to recognize words from your grammar using Pocketsphinx.js library, it provides javascript-based recognizer which should be very good for grammars.
这篇关于有没有办法在HTML 5语音输入API中使用语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!