AppendDictation微软语音平台11(服务器)? [英] AppendDictation on Microsoft Speech Platform 11 (Server)?

查看:361
本文介绍了AppendDictation微软语音平台11(服务器)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是比较新的C#和Microsoft语音平台,但我工作的一个服务器应用程序将需要抄写默写自由。在MS语音平台SDK似乎是完美的,工作在服务器上,除非我引用AppendDictation在GrammarBuilder()方法。

I'm relatively new to both C# and the Microsoft Speech platform, but I am working on a server application that will need to transcribe free dictation. The MS Speech Platform SDK seemed perfect, and works on the server, unless i reference the AppendDictation() method in GrammarBuilder.

我现在用的是微软语音平台SDK 11,而应用程序工作正常,如果我定义了一个语法,但我AppendDictation()添加的那一刻,我遇到了这个错误:

I am using the Microsoft Speech Platform SDK 11, and the application works fine if I define a grammar, but the moment I add in AppendDictation(), I am met with this error:

Cannot find grammar referenced by this grammar.



即使从文档这个样本似乎失败:

Even this sample from the documentation seems to fail:

GrammarBuilder startStop = new GrammarBuilder();
GrammarBuilder dictation = new GrammarBuilder();
dictation.AppendDictation();

startStop.Append(new SemanticResultKey("StartDictation", new SemanticResultValue("Start Dictation",true)));
startStop.Append(new SemanticResultKey("DictationInput", dictation));
startStop.Append(new SemanticResultKey("StopDictation", new SemanticResultValue("Stop Dictation", false)));
Grammar grammar=new Grammar(startStop);
grammar.Enabled=true;
grammar.Name=" Free-Text Dictation ";
_recognizer.LoadGrammar(grammar);



奇怪的是,如果我改变LoadGrammar到LoadGrammarAsync,语法负载(或至少是事件处理程序被调用),但随后的recoginzer失败,此错误:

Oddly, if I change LoadGrammar to LoadGrammarAsync, the grammar loads (or at least the event handler is called), but then the recoginzer fails with this error:

Error: At least one grammar must be loaded before doing a recognition.



我读过平台的服务器版本不支持听写,但似乎奇怪的是,它将与是行不通的方法出货。有没有人得到了一个听写语法在服务器上运行?我在做什么错了?

I've read that the server version of the platform does not support dictation, but it seems odd that it would ship with a method that just doesn't work. Has anyone managed to get a dictation grammar to work on the server? What am I doing wrong?

非常感谢

推荐答案

有关人谁可能会遇到这样的未来 - 现在我已经通过电子邮件来回与微软,并最终收到此响应:

For anyone who may come across this in the future -- I've now emailed back and forth with Microsoft, and ultimately received this response:

管理接口(Microsoft.Speech和System.Speech)是建立在原生接口SAPI顶部
。这些接口是为服务器引擎和台式发动机相同

The managed interfaces (Microsoft.Speech and System.Speech) are built on top of the native SAPI interfaces. These interfaces are the same for both the Server engine and the Desktop engine.

但发动机
本身负责执行听写,并且服务器
引擎没有这样做。因此,当您加载
语法的调用将失败。

BUT the engine itself is responsible for implementing dictation, and the Server engine does not do so. Therefore, the call will fail when you load the grammar.

不是问题的答案我所期待的,但它确实解释它。

Not the answer I was hoping for, but it does explain it.

这篇关于AppendDictation微软语音平台11(服务器)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆