Cortana命令仅在说出时才起作用

时间:2015-10-19 23:40:23

标签: windows-10 cortana

经过多次挫折后,我意识到Cortana语音命令似乎只在被说出时被识别出来,而不是用键盘输入时。例如,在安装CortanaVoiceCommand示例项目后,我可以说" Adventure Works显示我的伦敦之旅"它的工作原理。但是,如果我键入完全相同的短语,则命令不会被识别,而是搜索Bing。

有没有办法让Cortana同时识别语音手动输入的命令?

1 个答案:

答案 0 :(得分:3)

在此处运行一些测试后,可能会发生这种情况,因为您使用的是较旧的旧版代码(文档和示例意外使用<CommandPrefix>代替<AppName>并包含逗号,您应该使用遗漏。)

如果你制作的VCD看起来像这样:

<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
  <CommandSet xml:lang="en-us" Name="AdventureWorksCommandSet_en-us">
    <AppName> Adventure Works</AppName>
    <Example> Show trip to London </Example>

    <Command Name="showTripToDestination">
      <Example> Show trip to London </Example>
      <ListenFor RequireAppName="BeforeOrAfterPhrase"> show [my] trip to {destination} </ListenFor>
   ...

您的键盘输入方案应该更好,语音也会更准确。 <CommandPrefix>标记是遗留标记,在最初构建时偶然包含在样本中。

相关问题