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

# XSpeechToTextSetPositionHint

> XSpeechToTextSetPositionHint

# XSpeechToTextSetPositionHint

音声テキスト変換ウィンドウの位置を設定します。

## 構文

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

### パラメーター

*position*   \_In\_\
型: [XSpeechToTextPositionHint](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/enums/xspeechtotextpositionhint.md)

音声テキスト変換ウィンドウの位置を指定する列挙型です。

### 戻り値

型: HRESULT

成功した場合は HRESULT。 それ以外の場合はエラー コードを返します。\
エラー コードの一覧については、「[エラー コード](https://docs.xbox.com/ja-jp/reference/errorcodes.md)」を参照してください。

## 解説

> [!NOTE]
>
> この関数は、時間依存スレッドで呼び出しても安全ではありません。 詳細については、「[Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)」を参照してください。

この関数を成功させるには、クローズド キャプションを有効にする必要があります。
ユーザーがゲーム タイトルの UI でクローズド キャプション機能を有効にする必要があります。
ユーザーがクローズド キャプションを有効にした場合、ゲーム タイトルは [XClosedCaptionSetEnabled](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md) を呼び出すことでクローズド キャプションのステータスをフラグとして設定できます。

次の例は、音声テキスト変換ウィンドウを画面下部中央に配置する方法を示しています。

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

## 要件

**ヘッダー:** XAccessibility.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

## 概念ドキュメント

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

## 関連項目

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

[XSpeechToTextPositionHint](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/enums/xspeechtotextpositionhint.md)

[XClosedCaptionSetEnabled](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xclosedcaptionsetenabled.md)


## Related topics

- [XSpeechToTextPositionHint](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/enums/xspeechtotextpositionhint.md)
- [XSpeechToTextType](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/enums/xspeechtotexttype.md)
- [XAccessibility (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/xaccessibility_members.md)
- [Unity プロジェクトでの GDK API 用 C# ラッパーの使用](https://docs.xbox.com/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameUiTextEntryPositionHint](https://docs.xbox.com/ja-jp/reference/system/xgameui/enums/xgameuitextentrypositionhint.md)
