XSpeechToTextUpdateHypothesisString

Updates a hypothesis string in a text overlay.

Syntax

HRESULT XSpeechToTextUpdateHypothesisString(  
         uint32_t hypothesisId,  
         const char* content  
)  

Parameters

hypothesisId   _In_
Type: uint32_t

The hypothesis ID that was returned by XSpeechToTextBeginHypothesisString.

content   _In_z_
Type: char*

The updated hypothesis string.

Return value

Type: HRESULT

HRESULT success or error code.

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.

To finalize a hypothesis, use 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 section of XSpeechToTextBeginHypothesisString.

Requirements

Header: XAccessibility.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XAccessibility