Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 1.82 KB

speechsynthesizer_trysetdefaultvoiceasync_2101787546.md

File metadata and controls

45 lines (27 loc) · 1.82 KB
-api-id -api-type
M:Windows.Media.SpeechSynthesis.SpeechSynthesizer.TrySetDefaultVoiceAsync(Windows.Media.SpeechSynthesis.VoiceInformation)
winrt method

Windows.Media.SpeechSynthesis.SpeechSynthesizer.TrySetDefaultVoiceAsync

-description

Asynchronously attempts to set the voice used for speech synthesis on an IoT device.

Note

This method is available only in Embedded mode.

-parameters

-param voice

One of the installed speech synthesis engines (voices).

-returns

An asynchronous operation that returns true if the set operation was a success. Otherwise, returns false.

-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 Windows.Globalization.ApplicationLanguages.Languages to get the ranked list of current runtime language values preferred by the user.

-examples

-see-also

Embedded mode, App capability declarations, Speech interactions, Speech recognition and speech synthesis sample