我正在开发一个Cortana应用程序,我想使用文本查询(也包括语音查询)来测试我的应用程序,但是Cortana只在我使用语音命令时激活我的应用程序。是否可以只使用文本来测试应用程序?
我应该修改应用程序中的/程序以使Cortana能够基于文本查询调用应用程序吗?
我用的是带Windows 10的笔记本电脑。
下面是我的VCD的一个示例:
<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
<CommandSet xml:lang="en-us" Name="FruitsCommandSet_en-us">
<AppName>Nutritional</AppName>
<Example>Show nutritional information about fruits.</Example>
<Command Name="GetFruitNames">
<Example>Show the fruit nutritional facts.</Example>
<ListenFor RequireAppName="ExplicitlySpecified">[Show] {builtin:AppName} details for [the] {FruitName}.</ListenFor>
<Feedback>Loading fruit details...</Feedback>
<Navigate />
</Command>
<PhraseTopic Label="FruitName">
</PhraseTopic>
</CommandSet>
</VoiceCommands>发布于 2016-01-26 16:08:03
张贴在这里,所以最后的答案更明确从上面的讨论。
John使用的VCD文件具有需要设置AppName (内置:AppName标记)的特性,并且在ListenFor语句中有一些标点符号,这使得文本匹配变得更加困难。
避免在ListenFor语句(如句点)中使用标点符号是一个好主意。虽然语音识别采用基于信任的匹配方法并能处理,但文本输入则要严格一点。
https://stackoverflow.com/questions/35000641
复制相似问题