locked
Finding Speech (voice command) Language+Region setting? RRS feed

  • Question

  • Question:

    I need to retrieve the language+region code for the default WP8 speech recognition service.  In the phone GUI this is under 'Speech'->'Speech language'.  How do I get to this attribute programmatically?

    NOTE: AppResources.ResourceLanguage or AppResources.Culture does not provide the attribute I need as they are the value behind 'Language+Region'->'Phone language' only. 

    Background:

    I have successfully used an English (en-US) VoiceCommandDefinition.xml (VCD.xml) file with my WP8 app.  There are problems when using speech recognition with a language-specific VCD.xml for languages other than English.  If the 'Speech'->'Speech language' attribute on the phone does not exactly match the 'lang' value on the VCD.xml none of the application's voice commands will be available. 

    To get speech recognition to work therefore I really need to dynamically change the 'lang' attribute in my VCD.xml when loaded so that I can make es-US look like es-MX as a best-effort alternate-language command-set.  Only when this value on the VCD.xml matches the value in 'Speech'->'Speech language' will the application's voice commands to the application load and be usable. 

    NOTE: the 'Language+Region'->'Phone language' setting on the phone only determines which pronunciation of the application name is used and not the actual commands.  Example, 'Language+Region'->'Phone language' and VCD.xml 'lang' attribute = 'es-US' while 'Speech'->'Speech language' = 'es-MX' causes no application voice commands to appear because the regions do not match.  What matters is the 'Speech'->'Speech language' attribute which I need to programmatically access during runtime. 

    Researched Sources:

    I read the pages associated with http://msdn.microsoft.com/en-us/library/windows/apps/jj207021%28v=vs.105%29.aspx (among others) before submitting this question as well as any Stackoverflow or MSDN forum pages that seemed relevant. 

    Thanks for your help if you can provide it. 



    • Edited by Richard Freytag Wednesday, October 15, 2014 7:14 PM clarification of final paragraph
    Wednesday, October 15, 2014 5:56 PM

Answers

  • I asked the question on Stackoverflow as well and got a good answer: http://stackoverflow.com/questions/26408056/finding-speech-voice-command-languageregion-culture-setting

    Friday, October 31, 2014 8:12 AM

All replies

  • Speech has always been a part of Windows Phone and it has offered some nice ways of interacting with your handset by using your voice alone.

    We have put together a guide that should suit those that are new to Windows Phone and also to those that have upgraded to Windows Phone 8. Interacting with voice recognition and commands can be a powerful and time saving way to use your phone efficiently and even safely.

    There are a number of ways that interacting with your phone can be very useful but the most obvious example would be while driving. The last thing we want to do when driving is sit and hold the device typing messages, finding someone in the People Hub to call or so on. It’s far too distracting and in many places now totally illegal.

    Windows Phone can be configured to read your text messages back over headsets and hands free kits and also lets you respond to instant messages and much more. Before we get into that we’ll need to setup the device for speech.

    Thursday, October 16, 2014 7:12 AM
  • That content you pointed me to looks to be something plagiarized from Jerry Nixon's MSDN forum post here:

    http://blogs.msdn.com/b/jerrynixon/archive/2012/10/29/the-absolute-top-15-features-of-windows-phone-8.aspx

    Are you the true author or part of Jerry's team? 


    • Edited by Richard Freytag Thursday, October 16, 2014 2:49 PM word choice improvement
    Thursday, October 16, 2014 2:16 PM
  • I asked the question on Stackoverflow as well and got a good answer: http://stackoverflow.com/questions/26408056/finding-speech-voice-command-languageregion-culture-setting

    Friday, October 31, 2014 8:12 AM