> ## 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.

# XSpeechToTextType

> XSpeechToTextType

# XSpeechToTextType

指定游戏所呈现文本的源类型。

## 语法

```cpp theme={null}
enum class XSpeechToTextType  : uint32_t  
{  
    Voice = 0,  
    Text = 1  
}  
```

## 常量

| 常量 | 说明 |
| - | - |
| Voice | 文本的来源为游戏内语音字幕或经转录的游戏语音聊天。指定 Voice 会使游戏 title 在呈现的文本旁显示麦克风图标。 |
| Text | 文本的来源为游戏内文本朗读或游戏内文本聊天。指定 Text 会使游戏 title 在呈现的文本旁显示键盘图标。 |

## 备注

您可以通过调用 [XSpeechToTextSendString](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md) 函数在游戏 title 屏幕上显示文本。

[XSpeechToTextSendString](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md) 函数以 **XSpeechToTextType** 枚举作为参数。

您还可以通过调用 [XSpeechToTextSetPositionHint](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint.md) 函数来设置语音转文本窗口的位置。

## 要求

**头文件：** XAccessibility.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XAccessibility](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/xaccessibility_members.md)

[XSpeechToTextSendString](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)

[XSpeechToTextSetPositionHint](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint.md)


## Related topics

- [XSpeechToTextSendString](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)
- [XSpeechToTextBeginHypothesisString](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xaccessibility/xaccessibility_members.md)
- [PartySynthesizeTextToSpeechType](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/enums/partysynthesizetexttospeechtype.md)
- [PartyLocalChatControl::SynthesizeTextToSpeech](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_synthesizetexttospeech.md)
