小编Jar*_*red的帖子

在Microsoft Speech Platform 11(服务器)上附加注释?

我对C#和Microsoft Speech平台都比较陌生,但我正在研究一个需要转录免费听写的服务器应用程序.MS Speech Platform SDK看起来很完美,并且可以在服务器上运行,除非我在GrammarBuilder中引用了AppendDictation()方法.

我正在使用Microsoft Speech Platform SDK 11,如果我定义语法,应用程序工作正常,但是当我在AppendDictation()中添加时,我遇到了这个错误:

Cannot find grammar referenced by this grammar.
Run Code Online (Sandbox Code Playgroud)

即使文档中的这个示例似乎也失败了:

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);
Run Code Online (Sandbox Code Playgroud)

奇怪的是,如果我将LoadGrammar更改为LoadGrammarAsync,语法加载(或至少调用事件处理程序),但是recoginzer失败并出现此错误:

Error: At least one grammar must be loaded before doing a recognition.
Run Code Online (Sandbox Code Playgroud)

我已经读过该平台的服务器版本不支持听写,但它似乎很奇怪,它将附带一个不起作用的方法.有没有人设法获得在服务器上工作的听写语法?我究竟做错了什么?

非常感谢

c# speech-recognition sapi speech-to-text

9
推荐指数
1
解决办法
3652
查看次数

是否可以在运行时动态加载Svelte模板?

我已经看过[<svelte:component>]here)的文档,但是看起来import在编译时我将不得不使用所有可能的模板。

在Svelte中是否可以fetch()根据用户操作从诸如调用之类的内容中加载任意数量的任意模板?然后将数据注入其中吗?

<slot>如果我计划在初始加载后对其进行更新,将其用于这样的工作是否效率低下?

svelte

2
推荐指数
1
解决办法
887
查看次数

特定页面的 ActionCable

想知道当您想将频道与正在查看的页面联系起来时,将 ActionCable 与 Turbolinks 结合使用的最佳实践是什么。

一个经典的例子,当然,如果你有一篇带有评论的文章——你怎么能只流式传输与查看的文章相关的那些评论,然后在查看不同的文章时订阅不同的频道?

turbolinks:loaded在 JQuery上使用过事件,但不知道将它链接到什么。我想每次都重新订阅吗?不重新加载JS怎么可能?

ruby-on-rails turbolinks actioncable

1
推荐指数
1
解决办法
1128
查看次数