在 SAPI 5.1 中加载多个语法文件
我正在使用 XML 语法文件来开发命令和控制应用程序。由于语法中有大约 4000 个条目,我无法将所有内容都放在一个文件中(当我尝试加载它时会出现错误)。我已经编写了多个 XML 语法文件,但是当我尝试加载多个文件时,它会替换先前加载的文件。也就是说,程序只识别第二个语法文件中的短语。谁能告诉我如何在单个语音识别应用程序中加载多个语法?
I'm using an XML grammar file to develop a Command and Control application. Since there are around 4000 entries in the grammar I can't have it all in one file (it gives an error when I try to load it). I have written multiple XML grammar files, but when I try to load more than one file it replaces the previously loaded file. that is the program only recognizes the phrases in the second grammar file. Can anyone tell me how to load multiple grammars in a single speech recognition application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以创建多个语法,你必须给它们不同的ID。
这些片段位于 Delphi 中,但您可以改编:
You can create multiple grammar, you have to give them different IDs.
These snippets are in Delphi, but you can adapt: