VoiceInformation.Gender Property
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.
Gets the gender setting of the speech synthesis engine (voice).
public:
property VoiceGender Gender { VoiceGender get(); };
VoiceGender Gender();
public VoiceGender Gender { get; }
var voiceGender = voiceInformation.gender;
Public ReadOnly Property Gender As VoiceGender
Property Value
The gender of the voice.
Examples
Here, we show how to select a gender for the voice (VoiceInformation.Gender) by using either the first female voice (VoiceGender) found, or just the default system voice (SpeechSynthesizer.DefaultVoice), if no female voice is found.
using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())
{
VoiceInformation voiceInfo =
(
from voice in SpeechSynthesizer.AllVoices
where voice.Gender == VoiceGender.Female
select voice
).FirstOrDefault() ?? SpeechSynthesizer.DefaultVoice;
synthesizer.Voice = voiceInfo;
// Windows.Media.SpeechSynthesis.SpeechSynthesisStream
stream = await synthesizer.SynthesizeTextToStreamAsync(text);
}
Remarks
Here is a list of Microsoft-signed voices provided with Windows.
Voice | Gender | Windows 8 | Windows 8.1 | Name | Display name |
---|---|---|---|---|---|
English US | Female | Y | Y | Zira | Microsoft Zira (en-US, female). |
English US | Male | Y | Y | David | Microsoft David (en-US, male) |
English GB | Female | Y | Y | Hazel | Microsoft Hazel (en-GB, female) |
French FR | Female | Y | Y | Hortense | Microsoft Hortense (fr-FR , female) |
German DE | Female | Y | Y | Hedda | Microsoft Hedda (de-DE, female) |
Spanish ES | Female | Y | Y | Helena | Microsoft Helena (es-ES, female) |
Chinese PRC | Female | Y | Y | Huihui | Microsoft Huihui (zh-CN, female) |
Chinese TW | Female | Y | Y | Hanhan | Microsoft Hanhan (zh-TW, female) |
Japanese JA | Female | Y | Y | Haruka | Microsoft Haruka (ja-JP, female) |
Korean KR | Female | Y | Y | Heami | Microsoft Heami (ko-KR, female) |
Spanish MX | Female | N | Y | Sabina | Microsoft Sabina (es-MX, female) |
Italian IT | Female | N | Y | Elsa | Microsoft Elsa (it-IT, female) |
English IN | Female | N | Y | Heera | Microsoft Heera (en-IN, female) |
Russian RU | Female | N | Y | Irina | Microsoft Irina (ru-RU, female) |
Chinese HK | Female | N | Y | Tracy | Microsoft Tracy (zh-HK, female) |
Polish PL | Female | N | Y | Paulina | Microsoft Paulina (pl-PL, female) |
Portuguese BR | Female | N | Y | Maria | Microsoft Maria (pt-BR, female) |