SpeechRecognizer.TrySetSystemSpeechLanguageAsync(Language) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously attempts to set the system language used for speech recognition on an IoT device.
Note
This method is available only in Embedded mode.
public:
static IAsyncOperation<bool> ^ TrySetSystemSpeechLanguageAsync(Language ^ speechLanguage);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<bool> TrySetSystemSpeechLanguageAsync(Language const& speechLanguage);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<bool> TrySetSystemSpeechLanguageAsync(Language speechLanguage);
function trySetSystemSpeechLanguageAsync(speechLanguage)
Public Shared Function TrySetSystemSpeechLanguageAsync (speechLanguage As Language) As IAsyncOperation(Of Boolean)
Parameters
Returns
An asynchronous operation that returns true if the set operation was a success. Otherwise, returns false.
- Attributes
Windows requirements
Device family |
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v5.0)
|
Remarks
Your app must declare the systemManagement capability, which lets apps access basic system administration privileges including locale, timezone, shut down, and reboot.
The systemManagement capability must include the iot namespace when you declare it in your app's package manifest.
<Capabilities><iot:Capability Name="systemManagement"/></Capabilities>
Use SystemSpeechLanguage to get the current system speech recognition language.
Use Windows.Globalization.Language.IsWellFormed to validate speechLanguage.