IT. Expert System.

Android Reference

RecognizerIntent


android.speech

Class RecognizerIntent



  • public class RecognizerIntent
    extends Object
    Constants for supporting speech recognition through starting an Intent
    • Field Detail

      • EXTRA_CALLING_PACKAGE

        public static final String EXTRA_CALLING_PACKAGE
        The extra key used in an intent to the speech recognizer for voice search. Not generally to be used by developers. The system search dialog uses this, for example, to set a calling package for identification by a voice search API. If this extra is set by anyone but the system process, it should be overridden by the voice search implementation.
        See Also:
        Constant Field Values
      • ACTION_VOICE_SEARCH_HANDS_FREE

        public static final String ACTION_VOICE_SEARCH_HANDS_FREE
        Starts an activity that will prompt the user for speech without requiring the user's visual attention or touch input. It will send it through a speech recognizer, and either synthesize speech for a web search result or trigger another type of action based on the user's speech. This activity may be launched while device is locked in a secure mode. Special care must be taken to ensure that the voice actions that are performed while hands free cannot compromise the device's security. The activity should check the value of the EXTRA_SECURE extra to determine whether the device has been securely locked. If so, the activity should either restrict the set of voice actions that are permitted or require some form of secure authentication before proceeding. To ensure that the activity's user interface is visible while the lock screen is showing, the activity should set the WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED window flag. Otherwise the activity's user interface may be hidden by the lock screen. The activity should take care not to leak private information when the device is securely locked.

        Optional extras:

        See Also:
        Constant Field Values
      • EXTRA_SECURE

        public static final String EXTRA_SECURE
        Optional boolean to indicate that a "hands free" voice search was performed while the device was in a secure mode. An example of secure mode is when the device's screen lock is active, and it requires some form of authentication to be unlocked. When the device is securely locked, the voice search activity should either restrict the set of voice actions that are permitted, or require some form of secure authentication before proceeding.
        See Also:
        Constant Field Values
      • EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS

        public static final String EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS
        The minimum length of an utterance. We will not stop recording before this amount of time. Note that it is extremely rare you'd want to specify this value in an intent. If you don't have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results - use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.
        See Also:
        Constant Field Values
      • EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

        public static final String EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS
        The amount of time that it should take after we stop hearing speech to consider the input complete. Note that it is extremely rare you'd want to specify this value in an intent. If you don't have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results - use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.
        See Also:
        Constant Field Values
      • EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS

        public static final String EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS
        The amount of time that it should take after we stop hearing speech to consider the input possibly complete. This is used to prevent the endpointer cutting off during very short mid-speech pauses. Note that it is extremely rare you'd want to specify this value in an intent. If you don't have a very good reason to change these, you should leave them as they are. Note also that certain values may cause undesired or unexpected results - use judiciously! Additionally, depending on the recognizer implementation, these values may have no effect.
        See Also:
        Constant Field Values
      • EXTRA_PROMPT

        public static final String EXTRA_PROMPT
        Optional text prompt to show to the user when asking them to speak.
        See Also:
        Constant Field Values
      • EXTRA_LANGUAGE

        public static final String EXTRA_LANGUAGE
        Optional IETF language tag (as defined by BCP 47), for example "en-US". This tag informs the recognizer to perform speech recognition in a language different than the one set in the Locale.getDefault().
        See Also:
        Constant Field Values
      • EXTRA_ORIGIN

        public static final String EXTRA_ORIGIN
        Optional value which can be used to indicate the referer url of a page in which speech was requested. For example, a web browser may choose to provide this for uses of speech on a given page.
        See Also:
        Constant Field Values
      • EXTRA_MAX_RESULTS

        public static final String EXTRA_MAX_RESULTS
        Optional limit on the maximum number of results to return. If omitted the recognizer will choose how many results to return. Must be an integer.
        See Also:
        Constant Field Values
      • EXTRA_WEB_SEARCH_ONLY

        public static final String EXTRA_WEB_SEARCH_ONLY
        Optional boolean, to be used with ACTION_WEB_SEARCH, to indicate whether to only fire web searches in response to a user's speech. The default is false, meaning that other types of actions can be taken based on the user's speech.
        See Also:
        Constant Field Values
      • EXTRA_PARTIAL_RESULTS

        public static final String EXTRA_PARTIAL_RESULTS
        Optional boolean to indicate whether partial results should be returned by the recognizer as the user speaks (default is false). The server may ignore a request for partial results in some or all cases.
        See Also:
        Constant Field Values
      • EXTRA_RESULTS_PENDINGINTENT

        public static final String EXTRA_RESULTS_PENDINGINTENT
        When the intent is 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.
        See Also:
        Constant Field Values
      • EXTRA_RESULTS_PENDINGINTENT_BUNDLE

        public static final String EXTRA_RESULTS_PENDINGINTENT_BUNDLE
        If you use 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.
        See Also:
        Constant Field Values
      • RESULT_NO_MATCH

        public static final int RESULT_NO_MATCH
        Result code returned when no matches are found for the given speech
        See Also:
        Constant Field Values
      • RESULT_CLIENT_ERROR

        public static final int RESULT_CLIENT_ERROR
        Result code returned when there is a generic client error
        See Also:
        Constant Field Values
      • RESULT_SERVER_ERROR

        public static final int RESULT_SERVER_ERROR
        Result code returned when the recognition server returns an error
        See Also:
        Constant Field Values
      • RESULT_NETWORK_ERROR

        public static final int RESULT_NETWORK_ERROR
        Result code returned when a network error was encountered
        See Also:
        Constant Field Values
      • RESULT_AUDIO_ERROR

        public static final int RESULT_AUDIO_ERROR
        Result code returned when an audio error was encountered
        See Also:
        Constant Field Values
      • EXTRA_RESULTS

        public static final String EXTRA_RESULTS
        An ArrayList<String> of the recognition results when performing ACTION_RECOGNIZE_SPEECH. Generally this list should be ordered in descending order of speech recognizer confidence. (See EXTRA_CONFIDENCE_SCORES). Returned in the results; not to be specified in the recognition request. Only present when Activity.RESULT_OK is returned in an activity result. In a PendingIntent, the lack of this extra indicates failure.
        See Also:
        Constant Field Values
      • EXTRA_CONFIDENCE_SCORES

        public static final String EXTRA_CONFIDENCE_SCORES
        A float array of confidence scores of the recognition results when performing ACTION_RECOGNIZE_SPEECH. The array should be the same size as the ArrayList returned in EXTRA_RESULTS, and should contain values ranging from 0.0 to 1.0, or -1 to represent an unavailable confidence score.

        Confidence values close to 1.0 indicate high confidence (the speech recognizer is confident that the recognition result is correct), while values close to 0.0 indicate low confidence.

        Returned in the results; not to be specified in the recognition request. This extra is optional and might not be provided. Only present when Activity.RESULT_OK is returned in an activity result.

        See Also:
        Constant Field Values


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 332 / . Delta: 0.03157 с