> ## 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 會使遊戲在轉譯的文字旁顯示麥克風圖示。 |
| Text | 文字來源為遊戲內文字朗讀或遊戲內文字聊天。指定 Text 會使遊戲在轉譯的文字旁顯示鍵盤圖示。 |

## 備註

您可以呼叫 [XSpeechToTextSendString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextsendstring) 函式，在遊戲畫面上顯示文字。

[XSpeechToTextSendString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextsendstring) 函式會接受 **XSpeechToTextType** 列舉作為引數。

您也可以呼叫 [XSpeechToTextSetPositionHint](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint) 函式來設定語音轉文字視窗的位置。

## 需求

**標頭：** XAccessibility.h

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

## 另請參閱

[XAccessibility](/zh-TW/reference/system/xaccessibility/xaccessibility_members)

[XSpeechToTextSendString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextsendstring)

[XSpeechToTextSetPositionHint](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextsetpositionhint)


## Related topics

- [XSpeechToTextType](/reference/system/xaccessibility/enums/xspeechtotexttype.md)
- [XSpeechToTextSendString](/reference/system/xaccessibility/functions/xspeechtotextsendstring.md)
