Fields Summary |
---|
public static final String | ACTION_RECOGNIZE_SPEECHStarts an activity that will prompt the user for speech and sends it through a
speech recognizer. The results will be returned via activity results, or forwarded
via a PendingIntent if one is provided.
Required extras:
- {@link #EXTRA_LANGUAGE_MODEL}
Optional extras:
- {@link #EXTRA_PROMPT}
- {@link #EXTRA_LANGUAGE}
- {@link #EXTRA_MAX_RESULTS}
- {@link #EXTRA_RESULTS_PENDINGINTENT}
- {@link #EXTRA_RESULTS_PENDINGINTENT_BUNDLE}
Result extras:
NOTE: There may not be any applications installed to handle this action, so you should
make sure to catch {@link ActivityNotFoundException}. |
public static final String | ACTION_WEB_SEARCHStarts an activity that will prompt the user for speech, sends it through a
speech recognizer, and invokes and displays a web search result.
Required extras:
- {@link #EXTRA_LANGUAGE_MODEL}
Optional extras:
- {@link #EXTRA_PROMPT}
- {@link #EXTRA_LANGUAGE}
- {@link #EXTRA_MAX_RESULTS}
Result extras:
NOTE: There may not be any applications installed to handle this action, so you should
make sure to catch {@link ActivityNotFoundException}. |
public static final String | EXTRA_LANGUAGE_MODELInforms the recognizer which speech model to prefer when performing
{@link #ACTION_RECOGNIZE_SPEECH}. The recognizer uses this
information to fine tune the results. This extra is required. Activities implementing
{@link #ACTION_RECOGNIZE_SPEECH} may interpret the values as they see fit. |
public static final String | LANGUAGE_MODEL_FREE_FORMUse a language model based on free-form speech recognition. This is a value to use for
{@link #EXTRA_LANGUAGE_MODEL}. |
public static final String | LANGUAGE_MODEL_WEB_SEARCHUse a language model based on web search terms. This is a value to use for
{@link #EXTRA_LANGUAGE_MODEL}. |
public static final String | EXTRA_PROMPTOptional text prompt to show to the user when asking them to speak. |
public static final String | EXTRA_LANGUAGEOptional language override to inform the recognizer that it should expect speech in
a language different than the one set in the {@link java.util.Locale#getDefault()}. |
public static final String | EXTRA_MAX_RESULTSOptional limit on the maximum number of results to return. If omitted the recognizer
will choose how many results to return. Must be an integer. |
public static final String | EXTRA_RESULTS_PENDINGINTENTWhen the intent is {@link #ACTION_RECOGNIZE_SPEECH}, the speech input activity will
return results to you via the activity results mechanism. Alternatively, if you use this
extra to supply a PendingIntent, the results will be added to its bundle and the
PendingIntent will be sent to its target. |
public static final String | EXTRA_RESULTS_PENDINGINTENT_BUNDLEIf you use {@link #EXTRA_RESULTS_PENDINGINTENT} to supply a forwarding intent, you can
also use this extra to supply additional extras for the final intent. The search results
will be added to this bundle, and the combined bundle will be sent to the target. |
public static final int | RESULT_NO_MATCHResult code returned when no matches are found for the given speech |
public static final int | RESULT_CLIENT_ERRORResult code returned when there is a generic client error |
public static final int | RESULT_SERVER_ERRORResult code returned when the recognition server returns an error |
public static final int | RESULT_NETWORK_ERRORResult code returned when a network error was encountered |
public static final int | RESULT_AUDIO_ERRORResult code returned when an audio error was encountered |
public static final String | EXTRA_RESULTSAn ArrayList of the potential results when performing
{@link #ACTION_RECOGNIZE_SPEECH}. Only present when {@link Activity#RESULT_OK} is returned. |