SpeechRecognizer.CreateSpeechRecognizer メソッド

定義

オーバーロード

名前 説明
CreateSpeechRecognizer(Context)

新しい SpeechRecognizerを作成するファクトリ メソッド。

CreateSpeechRecognizer(Context, ComponentName)

新しい SpeechRecognizerを作成するファクトリ メソッド。

CreateSpeechRecognizer(Context)

新しい SpeechRecognizerを作成するファクトリ メソッド。

[Android.Runtime.Register("createSpeechRecognizer", "(Landroid/content/Context;)Landroid/speech/SpeechRecognizer;", "")]
public static Android.Speech.SpeechRecognizer? CreateSpeechRecognizer(Android.Content.Context? context);
[<Android.Runtime.Register("createSpeechRecognizer", "(Landroid/content/Context;)Landroid/speech/SpeechRecognizer;", "")>]
static member CreateSpeechRecognizer : Android.Content.Context -> Android.Speech.SpeechRecognizer

パラメーター

context
Context

作成する SpeechRecognizer

返品

新しい SpeechRecognizer

属性

注釈

新しい SpeechRecognizerを作成するファクトリ メソッド。 作成されたSpeechRecognizerにコマンドをディスパッチする前に、#setRecognitionListener(RecognitionListener)を呼び出す必要があることに注意してください。それ以外の場合、通知は受信されません。

<strong>Important:</strong> 呼び出し元は、必要なくなったときに SpeechRecognizer オブジェクトに対して #destroy() を呼び出す必要があります。

Android 11 (API レベル 30) を対象とするアプリの音声認識サービスとの対話では、マニフェスト ファイルに <queries> 要素を追加する必要があります。

{@code
<queries>
<intent>
<action
                   android:name="android.speech.RecognitionService" />
</intent>
</queries>
            }

android.speech.SpeechRecognizer.createSpeechRecognizer(android.content.Context)の Java ドキュメント。

このページの一部は、Androidオープンソースプロジェクトによって作成および共有された作業に基づく変更でありCreative Commons 2.5属性ライセンスに記載されている条件に従って使用されます。

適用対象

CreateSpeechRecognizer(Context, ComponentName)

新しい SpeechRecognizerを作成するファクトリ メソッド。

[Android.Runtime.Register("createSpeechRecognizer", "(Landroid/content/Context;Landroid/content/ComponentName;)Landroid/speech/SpeechRecognizer;", "")]
public static Android.Speech.SpeechRecognizer? CreateSpeechRecognizer(Android.Content.Context? context, Android.Content.ComponentName? serviceComponent);
[<Android.Runtime.Register("createSpeechRecognizer", "(Landroid/content/Context;Landroid/content/ComponentName;)Landroid/speech/SpeechRecognizer;", "")>]
static member CreateSpeechRecognizer : Android.Content.Context * Android.Content.ComponentName -> Android.Speech.SpeechRecognizer

パラメーター

context
Context

作成する SpeechRecognizer

serviceComponent
ComponentName

このSpeechRecognizerを特定のサービスのComponentName

返品

新しい SpeechRecognizer

属性

注釈

新しい SpeechRecognizerを作成するファクトリ メソッド。 作成されたSpeechRecognizerにコマンドをディスパッチする前に、#setRecognitionListener(RecognitionListener)を呼び出す必要があることに注意してください。それ以外の場合、通知は受信されません。 このバージョンのメソッドを使用して、この SpeechRecognizer を転送する特定のサービスを指定します。

<strong>Important:</strong> 呼び出し元は、必要なくなったときに SpeechRecognizer オブジェクトに対して #destroy() を呼び出す必要があります。

<strong>Important</strong>: このメソッドを呼び出す前に、実際に存在し、RecognitionService#SERVICE_INTERFACEを提供serviceComponentandroid.content.pm.PackageManager#queryIntentServices(Intent, int)で確認してください。 通常、これは使用しません。 #createSpeechRecognizer(Context) を呼び出して、代わりにシステムの既定の認識サービスを使用するか、デバイス上の認識を使用する #createOnDeviceSpeechRecognizer(Context)

Android 11 (API レベル 30) を対象とするアプリの音声認識サービスとの対話では、マニフェスト ファイルに <queries> 要素を追加する必要があります。

{@code
<queries>
<intent>
<action
                   android:name="android.speech.RecognitionService" />
</intent>
</queries>
            }

android.speech.SpeechRecognizer.createSpeechRecognizer(android.content.Context, android.content.ComponentName)の Java ドキュメント。

このページの一部は、Androidオープンソースプロジェクトによって作成および共有された作業に基づく変更でありCreative Commons 2.5属性ライセンスに記載されている条件に従って使用されます。

適用対象