AVSpeechSynthesisVoice.FromLanguage(String) 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.
Retrieves a voice for a given BCP-47 tag plus locale identifier.
[Foundation.Export("voiceWithLanguage:")]
public static AVFoundation.AVSpeechSynthesisVoice FromLanguage (string language);
static member FromLanguage : string -> AVFoundation.AVSpeechSynthesisVoice
Parameters
Returns
- Attributes
Remarks
This method can retrieve voices for a locale by passing a locale identifier as well as a language code, as shown in the following example, which speaks with an Australian accent:
var su = new AVSpeechUtterance("Once a jolly swagman camped by a billabong") {
Rate = 0.33f,
Voice = AVSpeechSynthesisVoice.FromLanguage("en-AU")
};