> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XSpeechToTextFinalizeHypothesisString

> XSpeechToTextFinalizeHypothesisString

Finalizes a hypothesis and updates its string in a text overlay.

## Syntax

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

### Parameters

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

The hypothesis ID that was returned by [XSpeechToTextBeginHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md).

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

The final version of the hypothesis string.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This function finalizes a hypothesis and updates its 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 update a hypothesis string without finalizing it, use [XSpeechToTextUpdateHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md).

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

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](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md#remarksSection) section of [XSpeechToTextBeginHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md).

## Requirements

**Header:** XAccessibility.h

**Library:** xgameruntime.lib

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

## See also

[XAccessibility](https://docs.xbox.com/reference/system/xaccessibility/xaccessibility_members.md)


## Related topics

- [XSpeechToTextCancelHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextcancelhypothesisstring.md)
- [XSpeechToTextUpdateHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](https://docs.xbox.com/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility (API contents)](https://docs.xbox.com/reference/system/xaccessibility/xaccessibility_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
