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

# XSpeechToTextSetPositionHint

> XSpeechToTextSetPositionHint

# XSpeechToTextSetPositionHint

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

## Syntax

```cpp theme={null}
HRESULT XSpeechToTextSetPositionHint(  
         XSpeechToTextPositionHint position  
)  
```

### Parameters

*position*   \_In\_\
Type: [XSpeechToTextPositionHint](/reference/system/xaccessibility/enums/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](/reference/errorcodes).

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

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](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled).

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

```cpp theme={null}
auto hr = XSpeechToTextSetPositionHint(XSpeechToTextPositionHint::BottomCenter);
)  
```

## Requirements

**Header:** XAccessibility.h

**Library:** xgameruntime.lib

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

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

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

[XSpeechToTextPositionHint](/reference/system/xaccessibility/enums/xspeechtotextpositionhint)

[XClosedCaptionSetEnabled](/reference/system/xaccessibility/functions/xclosedcaptionsetenabled)


## Related topics

- [XSpeechToTextPositionHint](/reference/system/xaccessibility/enums/xspeechtotextpositionhint.md)
- [XSpeechToTextType](/reference/system/xaccessibility/enums/xspeechtotexttype.md)
- [XAccessibility](/reference/system/xaccessibility/xaccessibility_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameUiTextEntryPositionHint](/reference/system/xgameui/enums/xgameuitextentrypositionhint.md)
