键入"what can I say?“时,应用程序和语音命令不会显示在Cortana中。
我尝试在Cortana的前台使用语音命令,并且正在运行Cortana语音命令示例,但无法让Cortana显示应用程序或打开/执行名为"AdventureWorks“的应用程序的语音命令。
我使用的是Cortana Voice Command示例,它是我在Windows 10的调试中从Visual Studio 2015本地运行的。根据这个链接,这应该在我的本地机器上创建一个解包版本的示例,我应该能够从开始屏幕看到,但我不能。我已经在应用程序的功能下激活了麦克风,并包含了en-GB resources.resw文件,并将Package.appxmanifest更改为默认语言en-GB以进行匹配,以尝试确保Cortana的语言与应用程序匹配,以消除潜在问题。
下面的链接显示了从VS (无论是否调试)运行应用程序后,应用程序的未打包版本应该会出现在开始屏幕上:How to deploy a Metro App to the Desktop?
Cortana语音命令示例:https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CortanaVoiceCommand
注意:除了我之外,该应用程序是标准的,包括en-GB资源文件,将package.appxmanifest位置更改为en-GB,并将麦克风添加到应用程序的功能中。开发人员模式也已在我的pc上启用。
更新:向VoiceCommandDefinitionManager添加vcd.xml时未发生异常..看起来它应该可以工作了..我还注意到,在运行示例时,我看不到伦敦的图片,也看不到麦克风图标显示“正在收听”,就像这个视频:https://channel9.msdn.com/Events/Build/2015/3-716 at 04:16
此时,谷歌搜索“应用程序未在Cortana中显示”没有显示任何有用的结果。
还有没有人有幸让这个样本正常工作?或者类似的问题?另外,您使用的是en-GB版本吗?
如有任何帮助或想法,我们将不胜感激
发布于 2015-08-14 21:49:33
我已经使用en-US成功地测试了AdverntureWorks示例。另外,我还开发了另一个关于Cortana前景的sample。
基本上,我已经创建了VCD,然后安装它:
protected async override void OnLaunched(LaunchActivatedEventArgs e)
{
...
// Install the VCD
try
{
StorageFile vcdStorageFile = await Package.Current.InstalledLocation.GetFileAsync(@"HomeControlCommands.xml");
await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(vcdStorageFile);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine("There was an error registering the Voice Command Definitions", ex);
}
}然后处理激活:
protected override void OnActivated(IActivatedEventArgs e)
{
// Handle when app is launched by Cortana
if (e.Kind == ActivationKind.VoiceCommand)
{
VoiceCommandActivatedEventArgs commandArgs = e as VoiceCommandActivatedEventArgs;
SpeechRecognitionResult speechRecognitionResult = commandArgs.Result;
string voiceCommandName = speechRecognitionResult.RulePath[0];
string textSpoken = speechRecognitionResult.Text;
IReadOnlyList<string> recognizedVoiceCommandPhrases;
System.Diagnostics.Debug.WriteLine("voiceCommandName: " + voiceCommandName);
System.Diagnostics.Debug.WriteLine("textSpoken: " + textSpoken);
switch (voiceCommandName)
{
...
}
}
}详细过程描述如下:here
发布于 2015-10-07 21:07:35
我也有同样的问题。
确保您的Package.appxmanifest已打开麦克风功能,否则将无法工作。
要打开它,请在解决方案资源管理器中选择您的Package.appxmanifest,转到Capabilities并检查Microphone。
更多信息:http://jamescroft.co.uk/blog/universal-windows-8-dev/how-to-get-your-apps-cortana-ready/
希望这对你有帮助,损毁
发布于 2016-02-04 10:47:11
我遇到了和你一样的问题,正如DevEnitly所指出的,如果你的区域设置为UK,并且在你的VCD文件中,你的命令集的语言是en-US,它将不起作用,简单地将命令集的语言更改为us-gb (或任何适合你的区域的语言)应该可以做到这一点(对我来说是这样的),还要注意,如果你想支持不同的语言,你应该添加更多的CommandSets。希望这能解决你的问题。
https://stackoverflow.com/questions/31809161
复制相似问题