Düzenle

Aracılığıyla paylaş


AVSpeechSynthesisVoice.FromLanguage(String) Method

Definition

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

language
String

To be added.

This parameter can be null.

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")
};

Applies to