locked
[UWP][HTML]Cortana Integration : Multiple Phrase Topics RRS feed

  • Question

  • I'm creating a Javascript UWP for Windows 10. I have integrated Cortana, and everything works fine except one command, which needs two Phrase Topics.

    Example: Get Directions from Source to Destination.

    My VCD file is like this:

    <Command Name="getDirections">

        <Example>MyApp get directions from New York to New Jersey</Example>

        <ListenFor>get directions from {source} to {destination}</ListenFor>

        <Feedback>Fetching directions from {source} to {destination}</Feedback>

        <VoiceCommandService Target="myBackgroundService"/>

    </Command>

    <PhraseTopic Label="source" Scenario="Natural Language">

          <Subject> Natural Language </Subject>

    </PhraseTopic>

    <PhraseTopic Label="destination" Scenario="Natural Language">

          <Subject> Natural Language </Subject>

    </PhraseTopic>

    But the problem is, If I create 2 Phrase topics inside my command set, then Cortana commands fails to install.

    Is there any way to use one phrase topic at two places in same command.

    Please help me out :)




    • Edited by sandep34 Wednesday, November 16, 2016 1:14 PM
    • Edited by Xavier Xie-MSFT Thursday, November 17, 2016 7:36 AM subject
    Wednesday, November 16, 2016 1:12 PM

Answers

  • https://s22.postimg.org/egrdx5s1d/update.jpg

    Bingo! I couldn't rectify what was the problem really. But, I recreated the VCD file. And soon after commands started to register successfully. Other commands worked fine, while this particular command did not work.

    After restarting computer, it worked like a charm :)

    Thanks for your help!

    • Marked as answer by sandep34 Saturday, November 19, 2016 5:38 AM
    • Edited by sandep34 Saturday, November 19, 2016 5:47 AM
    Saturday, November 19, 2016 5:38 AM

All replies

  • Hi,

    By "Cortana commands fails to install." do you mean the app failed to install or cortana didn't start up your app?

    Best Regards,

    Elvis Xia

    Thursday, November 17, 2016 8:23 AM
  • No, The app works correctly. Only the function call to install voice commands from VCD file fails. I made this call during the initialization of the application. It fails to register the commands written inside VCD file.

    If commands fails to install, then Cortana won't be able to activate my app using voice.

    I think, only one phrase Topic is allowed per command set. But there should be some workaround, for using one phrase topic at two places.

    As a workaround, I have now used {source} as Phrase Topic, and {destination} as Phrase List.

    But I have to update Phrase list frequently :(



    • Edited by sandep34 Thursday, November 17, 2016 12:43 PM
    Thursday, November 17, 2016 12:37 PM
  • https://s22.postimg.org/egrdx5s1d/update.jpg

    Bingo! I couldn't rectify what was the problem really. But, I recreated the VCD file. And soon after commands started to register successfully. Other commands worked fine, while this particular command did not work.

    After restarting computer, it worked like a charm :)

    Thanks for your help!

    • Marked as answer by sandep34 Saturday, November 19, 2016 5:38 AM
    • Edited by sandep34 Saturday, November 19, 2016 5:47 AM
    Saturday, November 19, 2016 5:38 AM