> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XSpeechSynthesizerVoiceGender

> XSpeechSynthesizerVoiceGender

# XSpeechSynthesizerVoiceGender

指出語音的性別。

## 語法

```cpp theme={null}
enum class XSpeechSynthesizerVoiceGender  : uint32_t  
{  
    Female = 0,  
    Male = 1,  
}  
```

## 常數

| 常數 | 描述 |
| - | - |
| Female | 語音的性別為女性。 |
| Male | 語音的性別為男性。 |

## 備註

已安裝之語音合成引擎 (或稱 *語音*) 的性別，會在 [XSpeechSynthesizerVoiceInformation](/zh-TW/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation) 結構中以此列舉的常數表示。若要列舉及擷取目前裝置上已安裝語音的相關資訊，請呼叫 [XSpeechSynthesizerEnumerateInstalledVoices](/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices) 函式，並搭配 [XSpeechSynthesizerInstalledVoicesCallback](/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback) 回呼函式。後者會接收已安裝語音的 **XSpeechSynthesizerVoiceInformation** 結構，並針對目前裝置上安裝的每個語音呼叫一次。

如需示範如何使用 **XSpeechSynthesizerVoiceGender** 列舉的範例，請參閱 [XSpeechSynthesizerEnumerateInstalledVoices](/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices)。

## 需求

**標頭：** XSpeechSynthesizer.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XAccessibility](/zh-TW/reference/system/xaccessibility/xaccessibility_members)\
[XSpeechSynthesizerInstalledVoicesCallback](/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback)\
[XSpeechSynthesizerVoiceInformation](/zh-TW/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation)\
[XSpeechSynthesizer](/zh-TW/reference/system/xspeechsynthesizer/xspeechsynthesizer_members)


## Related topics

- [XSpeechSynthesizerVoiceGender](/reference/system/xspeechsynthesizer/enums/xspeechsynthesizervoicegender.md)
- [XSpeechSynthesizer](/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [XSpeechSynthesizerVoiceInformation](/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md)
- [XSpeechSynthesizerSetDefaultVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetdefaultvoice.md)
- [XSpeechSynthesizerSetCustomVoice](/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
