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

# XSpeechToTextCancelHypothesisString

> XSpeechToTextCancelHypothesisString

# XSpeechToTextCancelHypothesisString

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

<a id="syntaxSection" />

## 構文

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

<a id="parametersSection" />

### パラメーター

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

[XSpeechToTextBeginHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring) によって返された仮説 ID です。

<a id="retvalSection" />

### 戻り値

型: HRESULT

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

<a id="remarksSection" />

## 解説

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

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

オーバーレイの仮説文字列を更新するには、[XSpeechToTextUpdateHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring) を使用します。

仮説を確定するには、[XSpeechToTextFinalizeHypothesisString](/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring) を使用します。

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

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

<a id="requirementsSection" />

## 要件

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

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

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

<a id="seealsoSection" />

## 関連項目

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


## Related topics

- [XSpeechToTextUpdateHypothesisString](/ja-jp/reference/system/xaccessibility/functions/xspeechtotextupdatehypothesisstring.md)
- [XSpeechToTextFinalizeHypothesisString](/ja-jp/reference/system/xaccessibility/functions/xspeechtotextfinalizehypothesisstring.md)
- [XSpeechToTextBeginHypothesisString](/ja-jp/reference/system/xaccessibility/functions/xspeechtotextbeginhypothesisstring.md)
- [XAccessibility](/ja-jp/reference/system/xaccessibility/xaccessibility_members.md)
- [GDK 向け Unity C# API ラッパー](/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
