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

# XSpeechToTextCancelHypothesisString

> XSpeechToTextCancelHypothesisString

# XSpeechToTextCancelHypothesisString

仮説をキャンセルし、その文字列をテキスト オーバーレイから削除します。

## 構文

```cpp theme={null}
HRESULT XSpeechToTextCancelHypothesisString(  
         uint32_t hypothesisId  
)  
```

### パラメーター

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

[XSpeechToTextBeginHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md) によって返された仮説 ID です。

### 戻り値

型: HRESULT

HRESULT の成功またはエラー コードです。

## 解説

この関数は仮説をキャンセルし、その文字列をオーバーレイから削除します。

オーバーレイに表示できる文字列の数には制限があります。 最大数に達すると、古い文字列は期限切れになります。 期限切れとなった文字列が確定またはキャンセルされていない仮説である場合、その *hypothesisId* の値は無効になります。 無効な *hypothesisId* 値を渡してもエラーは返されません。

オーバーレイの仮説文字列を更新するには、[XSpeechToTextUpdateHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md) を使用します。

仮説を確定するには、[XSpeechToTextFinalizeHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md) を使用します。

一部のプラットフォームでは、アプリが `XSpeechToTextFinalizeHypothesisString` を呼び出すまで仮説文字列は表示されません。 仮説がキャンセルされない限り、文字列が確実に表示されるように、アプリは常に `XSpeechToTextFinalizeHypothesisString` を呼び出す必要があります。

コード例については、[XSpeechToTextBeginHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md) の[「解説」](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md#remarksSection)セクションを参照してください。

## 要件

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

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

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

## 関連項目

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


## Related topics

- [XSpeechToTextUpdateHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md)
- [XSpeechToTextFinalizeHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](https://docs.xbox.com/ja-jp/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.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)
