如何下载Cortana语音命令xml架构定义?我发现的示例项目中列出的url指向此url:
http://schemas.microsoft.com/voicecommands/1.1
然而,当我浏览到该网址时,没有任何内容可见。 Intellisense适用于我创建的xml文档元素,因此我只能假设它能够从该URL加载模式。
答案 0 :(得分:2)
在我的机器上,文件位于
C:\ Program Files(x86)\ Microsoft Visual Studio 12.0 \ Xml \ Schemas \ 1033
在该位置有许多文件,包括
WindowsPhoneVoiceCommandDefinition_v11.xsd
是命名空间的架构定义文件 http://schemas.microsoft.com/voicecommands/1.1
答案 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>
有关详细信息,请访问此链接http://talkitbr.com/2015/07/13/integrando-a-cortana-em-seu-aplicativo-windows-10