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

# XSpeechToTextType

> XSpeechToTextType

# XSpeechToTextType

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

## 语法

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

## 常量

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

## 备注

您可以通过调用 [XSpeechToTextSendString](/reference/system/xaccessibility/functions/xspeechtotextsendstring) 函数在游戏 title 屏幕上显示文本。

[XSpeechToTextSendString](/reference/system/xaccessibility/functions/xspeechtotextsendstring) 函数以 **XSpeechToTextType** 枚举作为参数。

您还可以通过调用 [XSpeechToTextSetPositionHint](/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint) 函数来设置语音转文本窗口的位置。

## 要求

**头文件：** XAccessibility.h

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

## 另请参阅

[XAccessibility](/reference/system/xaccessibility/xaccessibility_members)

[XSpeechToTextSendString](/reference/system/xaccessibility/functions/xspeechtotextsendstring)

[XSpeechToTextSetPositionHint](/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint)


## Related topics

- [XSpeechToTextSendString](/zh-CN/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)
- [XSpeechToTextBeginHypothesisString](/zh-CN/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility](/zh-CN/reference/system/xaccessibility/xaccessibility_members.md)
- [PartySynthesizeTextToSpeechType](/zh-CN/services/playfab/multiplayer/networking/reference/enums/partysynthesizetexttospeechtype.md)
- [PartyLocalChatControl::SynthesizeTextToSpeech](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_synthesizetexttospeech.md)
