c# - Registered Voice Control Definition file doesn't seem to work -
i registering following vcd.xml file in c# windows 10 universal application, can't cortana respond them, bing searches every time.
<?xml version="1.0" encoding="utf-8"?> <voicecommands xmlns="http://schemas.microsoft.com/voicecommands/1.2"> <commandset xml:lang="en-us" name="universalappcommandset_en-us"> <appname> spang </appname> <example> tell me time </example> <command name="telltime"> <example> tell me time </example> <listenfor requireappname="beforeorafterphrase"> tell me time </listenfor> <feedback> getting time you. </feedback> <navigate/> </command> </commandset> </voicecommands>
i'm registering in onlaunched, per microsoft directions.
try { // install main vcd. storagefile psfevcd = await storagefile.getfilefromapplicationuriasync(new uri("ms-appx:///assets/vcd.xml")); await windows.applicationmodel.voicecommands.voicecommanddefinitionmanager.installcommanddefinitionsfromstoragefileasync(psfevcd); system.diagnostics.debug.writeline("successfully installed voice commands."); } catch (exception ex) { system.diagnostics.debug.writeline("installing voice commands failed: " + ex.tostring()); }
i've trying speaking , typing command no luck. instantly performs bing search without pause.
nick.
okay figured out, language incorrect, have english (united kingdom) on pc, language should "en-gb" not "en-us".
Comments
Post a Comment