Britton
Britton

Reputation: 2981

Cortana commands only work when spoken

After much frustration I have realized that Cortana voice commands only seem to be recognized when they are spoken and not when typed with the keyboard. For example, after installing the CortanaVoiceCommand sample project I can say "Adventure Works show my trip to London" and it works. However, if I type in the exact same phrase the command isn't recognized and instead it searches Bing.

Is there a way to have Cortana recognize both voice and manually typed commands?

Upvotes: 3

Views: 364

Answers (1)

Andrew Pilley
Andrew Pilley

Reputation: 824

After running a few tests here, this is possibly happening because you're using an older legacy tag (The documentation and sample accidentally uses <CommandPrefix> instead of <AppName> and includes a comma, which you should leave out.)

If you make a VCD that looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2">
  <CommandSet xml:lang="en-us" Name="AdventureWorksCommandSet_en-us">
    <AppName> Adventure Works</AppName>
    <Example> Show trip to London </Example>

    <Command Name="showTripToDestination">
      <Example> Show trip to London </Example>
      <ListenFor RequireAppName="BeforeOrAfterPhrase"> show [my] trip to {destination} </ListenFor>
   ...

Your keyboard input scenario should work better, and voice will be more accurate as well. The <CommandPrefix> tag is a legacy tag that was accidentally included in the samples when it was built originally.

Upvotes: 3

Related Questions