Freigeben über


XSpeechToTextSetPositionHint

Sets the position of the speech-to-text window.

Syntax

HRESULT XSpeechToTextSetPositionHint(  
         XSpeechToTextPositionHint position  
)  

Parameters

position   _In_
Type: XSpeechToTextPositionHint

An enumeration specifying the position of the speech-to-text window.

Return value

Type: HRESULT

HRESULT if successful. Otherwise, returns an error code.
For a list of error codes, see Error Codes.

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

For this function to be successful, closed captions must be enabled. The user must enable the closed captions feature in the UI of the Game title. If the user enabled closed captions, your Game title can flag the status of closed captions by calling XClosedCaptionSetEnabled.

The following example demonstrates how to position the speech-to-text window at the bottom center of the screen.

auto hr = XSpeechToTextSetPositionHint(XSpeechToTextPositionHint::BottomCenter);
)  

Requirements

Header: XAccessibility.h

Library: xgameruntime.lib

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

See also

XAccessibility

XSpeechToTextPositionHint

XClosedCaptionSetEnabled