2016-07-05 23 views
0

我用下面的代码安装我的VCD文件(“语法”)到柯塔娜:如何让Cortana使用我的新的或更新的语音命令定义文件?

Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("VoiceCommandDefinitions.xml") 
.then(Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.installCommandDefinitionsFromStorageFileAsync) 
.then(() => Debug.writeln("Successfully installed VCD file"); 

成功报道,但是当我编写一个查询到柯塔娜,改变我对我的VCD文件进行没有反映在Cortana。

我该如何强制Cortana实际使用我更新的语法?

回答

0

Cortana只会在语音互动结束时刷新语法缓存。点击Cortana的麦克风按钮,然后立即关闭Cortana盒子。您应该会在几秒钟内看到您的语法更改。

安装的语法存储在%LOCALAPPDATA%\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState\Grammars\VoiceCommands.Components.0409.cfg下。实时(即高速缓存的)语法存储在%LOCALAPPDATA%\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState\Grammars\ReadOnlyGrammars\VoiceCommands.Components.0409.cfg下。每当用户完成与Cortana的语音交互时,该副本都会刷新。

(没有资料,对不起。这些信息基于与微软的Cortana开发者的电子邮件交流。)

相关问题