4

The Application and Voice commands are not shown in Cortana when typing "what can I say?"

I am attempting to use Voice Commands in the Foreground with Cortana and am running the Cortana Voice Command Sample and have been unable to get Cortana to show the application or Open / Perform Voice commands for the application named "AdventureWorks".

I am using the Cortana Voice Command Sample which I am running from Visual Studio 2015 locally on Windows 10 in debug. According to this link this should create an unpackage version of the sample on my local machine that I should be able to see from the Start screen which I cannot. I have activated Microphone under the capabilities of the app and included the en-GB resources.resw file and changed the Package.appxmanifest to the Default language of en-GB to match in an attempt to ensure that Cortana's language matches with the application to eliminate that as a potential issue.

Here is the link showing that a unpackaged version of the application should be visible in the Start screen after running the app from VS (with or without debugging): How to deploy a Metro App to the Desktop?

Cortana Voice Commands Sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CortanaVoiceCommand

Note: The application is standard apart from me including the en-GB resource file, changing the package.appxmanifest location to en-GB and adding Microphone to the capabilities of the application. Developer mode has also been enabled on my pc.

Update: There are no exceptions happening when adding the vcd.xml to the VoiceCommandDefinitionManager.. It looks like it should be working.. I have also noticed that when running the sample I cannot see the picture of London or the microphone icon saying "listening" like in this video: https://channel9.msdn.com/Events/Build/2015/3-716 at 04:16

At this time google searches for "application not showing in Cortana" does not show any useful results.

Has anyone else had any luck getting this sample to work? or similar issues? Also are you using the en-GB version?

Any help or ideas would be appreciated

Community
  • 1
  • 1
HonourCode
  • 318
  • 1
  • 3
  • 14
  • It is strange that working through this seperate example also doesn't show my application or commands in Cortana: https://msdn.microsoft.com/en-us/library/dn630430.aspx – HonourCode Aug 04 '15 at 13:29
  • Are your Language and region settings all set for en-GB? – DevEnitly Oct 09 '15 at 03:35
  • Having the same issue. Just the bare sample solution, nothing edited.... Did you find out what the problem is? – ThisWillDoIt Dec 12 '15 at 22:13

3 Answers3

1

I have successfully tested the AdverntureWorks sample using en-US. Also I have developed another sample regarding Cortana Foreground.

Basically I have created the VCD and then installed it:

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);
    }
}

And then handled the activation:

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)
        {
        ...
        }
    }
}

The detailed process is described here

talkitbr
  • 1,112
  • 9
  • 12
1

I had exactly same issue.

Make sure you have microphone capabilities turned on for your Package.appxmanifest otherwise it doesn't work.

Tu turn it on select your Package.appxmanifest in Solution Explorer go to Capabilities and check Microphone.

More info: http://jamescroft.co.uk/blog/universal-windows-8-dev/how-to-get-your-apps-cortana-ready/

Hope this helps, damtur

damtur
  • 179
  • 1
  • 4
1

I had the same problem as you, as noted by DevEnitly, if your region is set, for example, to UK and in your VCD file your CommandSet's language is en-US it won't work, simply changing the CommandSet's language to us-gb (or whatever language fits your region) should do the trick (it did for me), also note that, if you want to support different languages you should add more CommandSets. Hope this solve your problems.

Victor Capone
  • 191
  • 1
  • 6