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

Updates a hypothesis string in a text overlay.

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*hypothesisId*   \_In\_\
Type: uint32\_t

The hypothesis ID that was returned by [XSpeechToTextBeginHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring).

*content*   \_In\_z\_\
Type: char\*

The updated hypothesis string.

<a id="retvalSection" />

### Return value

Type: HRESULT

HRESULT success or error code.

<a id="remarksSection" />

## Remarks

This function updates a hypothesis string in place without moving it to the bottom of the overlay.

The overlay can display only a limited number of strings. When the maximum is reached, older strings are expired. If an expired string is a hypothesis that is not yet finalized or canceled, its *hypothesisId* value becomes invalid. Passing an invalid *hypothesisId* value does not return an error.

To cancel a hypothesis and remove it from the overlay, use [XSpeechToTextCancelHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring).

To finalize a hypothesis, use [XSpeechToTextFinalizeHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring).

On some platforms, the hypothesis string is not displayed until the app calls `XSpeechToTextFinalizeHypothesisString`. Unless the hypothesis is canceled, your app must always call `XSpeechToTextFinalizeHypothesisString` to ensure that the string is displayed.

For code examples, see the [Remarks](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring#remarksSection) section of [XSpeechToTextBeginHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring).

<a id="requirementsSection" />

## Requirements

**Header:** XAccessibility.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

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


## Related topics

- [XSpeechToTextFinalizeHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md)
- [XSpeechToTextCancelHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility](/reference/system/xaccessibility/xaccessibility_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
