Saturday, July 20, 2013

Some notes on using Voice Commands in a WP8 app

Earlier this evening I was asked to help someone with a problem they were having getting VoiceCommands to work in their Windows Phone 8 app.

As this is a feature I had yet to implement in an app myself, but is one I'm planning for a future app, I did some investigation...

In no particular order, here are some points of interest from my investigation, and from helping them debug their app:

  • You must register the voice command file (using VoiceCommandService.InstallCommandSetsFromFileAsync) - It's not enough just to include the VCD/XML file in the project.
  • You must include the ID_CAP_SPEECH_RECOGNITION, ID_CAP_MICROPHONE, and ID_CAP_NETWORKING capabilities. - Otherwise you'll get an AccessException when you try and register the file.
  • CommandSets are culturally sensitive. So, if you specify the language of the commandset as "en-US", it won't work on a phone with speech set to "English (United Kingdon)".  You can, however, include multiple commandsets in a file and you can use a culturally neutral language.
  • You can sepcify wildcards in the ListenFor section by using "{*}" and these will match anything. Unfortunately, the recongniser won't tell you what the user said though. YOu just get a ellipse in the response. (Some spelunking through some old mailing lists shows that this was escalated to Microsoft, by the developers behind some big apps, when the SDK was still very new so hopefully we'll be able to retrieve (be told) everything that was spoken in a future version.)

I hope this helps someone else save some time in future . :)




24 comments:

  1. It seems to collect a lot of different ideas in the Word document. I do it in different sheets of paper in my notebook. You have what you do now?

    ReplyDelete
  2. Do you want to learn meditation online? Light Watkins has been providing meditation course from many year in new york.Get the best meditation audio course online and best personal trainer now.

    ReplyDelete
  3. Are you a Windows Phone, Nokia-X (Android) or Asha developer? If so, you could be getting rewards for the apps you build and the success they achieve by. iWebHostingCoupons.com

    ReplyDelete
  4. It seems to collect a lot of different ideas in the Word document. I do it in different sheets of paper in my notebook. You have what you do now. family dentistry complete orthodontics 20

    ReplyDelete
  5. hank you for sharing the information. I would like to tell that I too have recently came across the firm named crim law firm who is providing the service of criminal defense and the lawyers are experienced. forex expert advisors

    ReplyDelete
  6. This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog. fashion blog

    ReplyDelete
  7. Thanks for give me information on this topic. you have sharing very nice post.
    Mindfulness Courses Dublin

    ReplyDelete
  8. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. como aliviar el dolor de cabeza sin pastillas

    ReplyDelete
  9. The learning lab is providing the best Maths and English tutor in Sydney and if you are looking for maths tutor for your child contact us now!

    ReplyDelete
  10. Really very good and brilliant ideas about Speech. I am really like your talk program. Thanks cat ba island vietnam

    ReplyDelete
  11. It seems like to accumulate many distinct ideas inside the Concept report. I truly do the idea in different sheets regarding papers inside my laptop. You might have whatever you accomplish today? for more information visit on halfuphalfdownhairstyles.com

    ReplyDelete
  12. thank people pertaining to sharing the details. I want to tell that we way too have got just lately found your organization called crim attorney who's going to be giving your assistance associated with offender safeguard and also the legal representatives usually are experienced. study abroad free

    ReplyDelete
  13. Within the vortex lies the secret to creation. This is why plants grow profusely with natural action vortex garden water. Work with nature, not against her.

    ReplyDelete
  14. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article.http://www.digimarkcentral.com

    ReplyDelete
  15. I have read your excellent post. This is a great job. I have enjoyed reading your post first time.potenzmittel

    ReplyDelete
  16. online college courses have always been favorite to me but i wonder how and where to get some online college courses with certificates and if there are some good online degrees, classes, etc to pursue?

    ReplyDelete
  17. People are very fond of looking fashionable and stylish and they adopt fashion for their living. They use to adopt different types of hairstyles for them. There are many styles of hairs are commonly used by the people but the half up half down hairstyles are most popular among young generation.

    ReplyDelete
  18. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site.

    ReplyDelete
  19. I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot!ezcleanupphiladelphia

    ReplyDelete
  20. I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.www.lifehealthmax.com

    ReplyDelete
  21. Forte School of Music is providing Music Lessons in Howick Auckland , New Zealand. Forte School is best in Music , Singing , Guitar and Piano Classes. Contact us now 09 534 2223

    ReplyDelete