RecognizerIntent.ActionRecognizeSpeech Field

Definition

Starts an activity that will prompt the user for speech and send it through a speech recognizer.

[Android.Runtime.Register("ACTION_RECOGNIZE_SPEECH")]
public const string ActionRecognizeSpeech;
[<Android.Runtime.Register("ACTION_RECOGNIZE_SPEECH")>]
val mutable ActionRecognizeSpeech : string

Field Value

Attributes

Remarks

Starts an activity that will prompt the user for speech and send it through a speech recognizer. The results will be returned via activity results (in Activity#onActivityResult, if you start the intent using Activity#startActivityForResult(Intent, int)), or forwarded via a PendingIntent if one is provided.

Starting this intent with just Activity#startActivity(Intent) is not supported. You must either use Activity#startActivityForResult(Intent, int), or provide a PendingIntent, to receive recognition results.

The implementation of this API is likely to stream audio to remote servers to perform speech recognition which can use a substantial amount of bandwidth.

Required extras: <ul> <li>#EXTRA_LANGUAGE_MODEL</ul>

Optional extras: <ul> <li>#EXTRA_PROMPT<li>#EXTRA_LANGUAGE<li>#EXTRA_MAX_RESULTS<li>#EXTRA_RESULTS_PENDINGINTENT<li>#EXTRA_RESULTS_PENDINGINTENT_BUNDLE</ul>

Result extras (returned in the result, not to be specified in the request): <ul> <li>#EXTRA_RESULTS</ul>

NOTE: There may not be any applications installed to handle this action, so you should make sure to catch ActivityNotFoundException.

Java documentation for android.speech.RecognizerIntent.ACTION_RECOGNIZE_SPEECH.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to