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

# XSpeechToTextUpdateHypothesisString

> XSpeechToTextUpdateHypothesisString

# XSpeechToTextUpdateHypothesisString

更新文字覆疊中的假設字串。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XSpeechToTextUpdateHypothesisString(  
         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* 值不會傳回錯誤。

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

若要完成假設，請使用 [XSpeechToTextFinalizeHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring)。

在某些平台上，必須等到應用程式呼叫 `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

- [XSpeechToTextCancelHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring.md)
- [XSpeechToTextFinalizeHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](/zh-TW/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility](/zh-TW/reference/system/xaccessibility/xaccessibility_members.md)
- [適用於 GDK 的 Unity C# API 包裝函式](/zh-TW/build/gdk-and-engines/unity/unity-api-wrappers.md)
