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

# XSpeechToTextFinalizeHypothesisString

> XSpeechToTextFinalizeHypothesisString

# XSpeechToTextFinalizeHypothesisString

完成假設，並更新其在文字覆疊中的字串。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XSpeechToTextFinalizeHypothesisString(  
         uint32_t hypothesisId,  
         const char* content  
)  
```

<a id="parametersSection" />

### 參數

*hypothesisId*   \_In\_\
類型：uint32\_t

[XSpeechToTextBeginHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring) 所傳回的假設識別碼。

*content*   \_In\_z\_\
類型：char\*

假設字串的最終版本。

<a id="retvalSection" />

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

<a id="remarksSection" />

## 備註

此函式會完成假設並就地更新其字串，而不會將其移至覆疊底部。

覆疊只能顯示有限數量的字串。達到上限時，較舊的字串會過期。如果過期的字串是尚未完成或取消的假設，其 *hypothesisId* 值會變成無效。傳遞無效的 *hypothesisId* 值不會傳回錯誤。

若要更新假設字串而不完成它，請使用 [XSpeechToTextUpdateHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring)。

若要取消假設並將其從覆疊中移除，請使用 [XSpeechToTextCancelHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring)。

在某些平台上，必須等到應用程式呼叫 `XSpeechToTextFinalizeHypothesisString` 之後，才會顯示假設字串。除非假設已取消，否則您的應用程式一律必須呼叫 `XSpeechToTextFinalizeHypothesisString`，以確保字串會顯示。

如需程式碼範例，請參閱 [XSpeechToTextBeginHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring) 的[備註](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring#remarksSection)一節。

<a id="requirementsSection" />

## 需求

**標頭：** XAccessibility.h

**程式庫：** xgameruntime.lib

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

<a id="seealsoSection" />

## 另請參閱

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


## Related topics

- [XSpeechToTextFinalizeHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md)
- [XSpeechToTextCancelHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring.md)
- [XSpeechToTextUpdateHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
