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

# XSpeechSynthesizerVoiceGender

> XSpeechSynthesizerVoiceGender

指出語音的性別。

## 語法

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

## 常數

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

## 備註

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

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

## 需求

**標頭：** XSpeechSynthesizer.h

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

## 另請參閱

[XAccessibility](https://docs.xbox.com/zh-TW/reference/system/xaccessibility/xaccessibility_members.md)\
[XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md)\
[XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md)\
[XSpeechSynthesizer](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)


## Related topics

- [XSpeechSynthesizerVoiceInformation](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/structs/xspeechsynthesizervoiceinformation.md)
- [XSpeechSynthesizer (API 內容)](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/xspeechsynthesizer_members.md)
- [XSpeechSynthesizerInstalledVoicesCallback](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerinstalledvoicescallback.md)
- [XSpeechSynthesizerSetCustomVoice](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizersetcustomvoice.md)
- [XSpeechSynthesizerEnumerateInstalledVoices](https://docs.xbox.com/zh-TW/reference/system/xspeechsynthesizer/functions/xspeechsynthesizerenumerateinstalledvoices.md)
