【发布时间】:2015-01-12 03:56:23
【问题描述】:
如何下载 Cortana 语音命令 xml 架构定义?我发现的示例项目中列出的 url 指向这个 url:
http://schemas.microsoft.com/voicecommands/1.1
但是,当我浏览到该网址时,什么都看不到。 Intellisense 适用于我创建的 xml 文档元素,因此我只能假设它能够从该 url 加载架构。
【问题讨论】:
如何下载 Cortana 语音命令 xml 架构定义?我发现的示例项目中列出的 url 指向这个 url:
http://schemas.microsoft.com/voicecommands/1.1
但是,当我浏览到该网址时,什么都看不到。 Intellisense 适用于我创建的 xml 文档元素,因此我只能假设它能够从该 url 加载架构。
【问题讨论】:
在我的机器上,文件位于
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas\1033
在那个位置有很多文件,包括
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>
欲了解更多信息,请访问此链接http://talkitbr.com/2015/07/13/integrando-a-cortana-em-seu-aplicativo-windows-10
【讨论】: