下载 Cortana 架构定义

Download Cortana schema definition

如何下载 Cortana 语音命令 xml 架构定义?我发现的示例项目中列出的 url 指向此 url:

http://schemas.microsoft.com/voicecommands/1.1

然而,当我浏览到 url 时,什么也看不到。 Intellisense 适用于我创建的 xml 文档元素,因此我只能假设它能够从 url 加载架构。

在我的机器上,文件位于

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas33

并且在该位置有许多文件,包括

WindowsPhoneVoiceCommandDefinition_v11.xsd

这是命名空间的模式定义文件 http://schemas.microsoft.com/voicecommands/1.1

您可以在 Voice Command Definition (VCD) elements and attributes v1.1

上找到有用的信息

完整VCD范例在此

<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
  <CommandSet xml:lang="en-us" Name="HomeControlCommandSet_en-us">
    <CommandPrefix>HomeControl</CommandPrefix>
    <Example>Control alarm, temperature, light and others</Example>

    <Command Name="Activate_Alarm">
      <Example>Activate alarm</Example>
      <ListenFor>[Would] [you] [please] activate [the] alarm [please]</ListenFor>
      <ListenFor RequireAppName="BeforeOrAfterPhrase">Activate alarm</ListenFor>
      <ListenFor RequireAppName="ExplicitlySpecified">Activate {builtin:AppName} alarm</ListenFor>
      <Feedback>Activating alarm</Feedback>
      <Navigate />
    </Command>

    <Command Name="Change_Temperature">
      <Example>Change temperature to 25º degrees</Example>
      <ListenFor>Change temperature to {temperature} degrees</ListenFor>
      <Feedback>Changing temperature to {temperature} degrees</Feedback>
      <Navigate />
    </Command>

    <Command Name="Change_Light_Color">
      <Example>Change light color to yellow</Example>
      <ListenFor>Change light color to {colors}</ListenFor>
      <Feedback>Changing light color to {colors}</Feedback>
      <Navigate />
    </Command>

    <PhraseList Label="colors">
      <Item>yellow</Item>
      <Item>green</Item>
      <Item>red</Item>
    </PhraseList>

    <PhraseTopic Label="temperature">
    </PhraseTopic>

  </CommandSet>
</VoiceCommands>

更多信息,请访问此link http://talkitbr.com/2015/07/13/integrando-a-cortana-em-seu-aplicativo-windows-10