Udostępnij za pośrednictwem


RecognizerIntent Class

Definition

Constants for supporting speech recognition through starting an Intent

[Android.Runtime.Register("android/speech/RecognizerIntent", DoNotGenerateAcw=true)]
public class RecognizerIntent : Java.Lang.Object
[<Android.Runtime.Register("android/speech/RecognizerIntent", DoNotGenerateAcw=true)>]
type RecognizerIntent = class
    inherit Object
Inheritance
RecognizerIntent
Attributes

Remarks

Constants for supporting speech recognition through starting an Intent

Java documentation for android.speech.RecognizerIntent.

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.

Constructors

RecognizerIntent(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

ActionGetLanguageDetails

A broadcast intent which can be fired to the BroadcastReceiver component specified in the meta-data defined in the #DETAILS_META_DATA meta-data of an Activity satisfying #ACTION_WEB_SEARCH.

ActionRecognizeSpeech

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

ActionVoiceSearchHandsFree

Starts an activity that will prompt the user for speech without requiring the user's visual attention or touch input.

ActionWebSearch

Starts an activity that will prompt the user for speech, send it through a speech recognizer, and either display a web search result or trigger another type of action based on the user's speech.

DetailsMetaData

Meta-data name under which an Activity implementing #ACTION_WEB_SEARCH can use to expose the class name of a BroadcastReceiver which can respond to request for more information, from any of the broadcast intents specified in this class.

ExtraAudioInjectSource

The extra key used in an intent which is providing an already opened audio source for the RecognitionService to use.

ExtraAudioSource

Optional android.os.ParcelFileDescriptor pointing to an already opened audio source for the recognizer to use.

ExtraAudioSourceChannelCount

Optional integer, to be used with #EXTRA_AUDIO_SOURCE, to indicate the number of channels in the audio.

ExtraAudioSourceEncoding

Optional integer (from android.media.AudioFormat), to be used with #EXTRA_AUDIO_SOURCE, to indicate the audio encoding.

ExtraAudioSourceSamplingRate

Optional integer, to be used with #EXTRA_AUDIO_SOURCE, to indicate the sampling rate of the audio.

ExtraBiasingStrings

Optional list of strings, towards which the recognizer should bias the recognition results.

ExtraCallingPackage

The extra key used in an intent to the speech recognizer for voice search.

ExtraConfidenceScores

A float array of confidence scores of the recognition results when performing #ACTION_RECOGNIZE_SPEECH.

ExtraEnableBiasingDeviceContext

Optional boolean to enable biasing towards device context.

ExtraEnableFormatting

Optional string to enable text formatting (e.

ExtraEnableLanguageDetection

Optional boolean indicating whether to enable language detection.

ExtraEnableLanguageSwitch

Optional string to enable automatic switching to the language being spoken with the desired sensitivity level, instead of being restricted to a single language.

ExtraHidePartialTrailingPunctuation

Optional boolean, to be used with #EXTRA_ENABLE_FORMATTING, to prevent the recognizer adding punctuation after the last word of the partial results.

ExtraLanguage

Optional IETF language tag (as defined by BCP 47), for example "en-US".

ExtraLanguageDetectionAllowedLanguages

Optional list of IETF language tags (as defined by BCP 47, e.

ExtraLanguageModel

Informs the recognizer which speech model to prefer when performing #ACTION_RECOGNIZE_SPEECH.

ExtraLanguagePreference

The key to the extra in the Bundle returned by #ACTION_GET_LANGUAGE_DETAILS which is a String that represents the current language preference this user has specified - a locale string like "en-US".

ExtraLanguageSwitchAllowedLanguages

Optional list of IETF language tags (as defined by BCP 47, e.

ExtraMaskOffensiveWords

Optional boolean indicating whether the recognizer should mask the offensive words in recognition results.

ExtraMaxResults

Optional limit on the maximum number of results to return.

ExtraOnlyReturnLanguagePreference

Specify this boolean extra in a broadcast of #ACTION_GET_LANGUAGE_DETAILS to indicate that only the current language preference is needed in the response.

ExtraOrigin

Optional value which can be used to indicate the referer url of a page in which speech was requested.

ExtraPartialResults

Optional boolean to indicate whether partial results should be returned by the recognizer as the user speaks (default is false).

ExtraPreferOffline

Optional boolean, to be used with #ACTION_RECOGNIZE_SPEECH, #ACTION_VOICE_SEARCH_HANDS_FREE, #ACTION_WEB_SEARCH to indicate whether to only use an offline speech recognition engine.

ExtraPrompt

Optional text prompt to show to the user when asking them to speak.

ExtraRequestWordConfidence

Optional boolean indicating whether the recognizer should return the confidence level of each word in the final recognition results.

ExtraRequestWordTiming

Optional boolean indicating whether the recognizer should return the timestamp of each word in the final recognition results.

ExtraResults

An ArrayList&lt;String&gt; of the recognition results when performing #ACTION_RECOGNIZE_SPEECH.

ExtraResultsPendingintent

When the intent is #ACTION_RECOGNIZE_SPEECH, the speech input activity will return results to you via the activity results mechanism.

ExtraResultsPendingintentBundle

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.

ExtraSecure

Optional boolean to indicate that a "hands free" voice search was performed while the device was in a secure mode.

ExtraSegmentedSession

Optional string to enable segmented session mode of the specified type, which can be #EXTRA_AUDIO_SOURCE, #EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS or #EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS.

ExtraSpeechInputCompleteSilenceLengthMillis

The amount of time that it should take after the recognizer stops hearing speech to consider the input complete hence end the recognition session.

ExtraSpeechInputMinimumLengthMillis

Optional integer to indicate the minimum length of the recognition session.

ExtraSpeechInputPossiblyCompleteSilenceLengthMillis

The amount of time that it should take after we stop hearing speech to consider the input possibly complete.

ExtraSupportedLanguages

The key to the extra in the Bundle returned by #ACTION_GET_LANGUAGE_DETAILS which is an ArrayList of Strings that represents the languages supported by this implementation of voice recognition - a list of strings like "en-US", "cmn-Hans-CN", etc.

ExtraWebSearchOnly

Optional boolean, to be used with #ACTION_WEB_SEARCH, to indicate whether to only fire web searches in response to a user's speech.

FormattingOptimizeLatency

Optimizes formatting latency.

FormattingOptimizeQuality

Optimizes formatting quality.

LanguageModelFreeForm

Use a language model based on free-form speech recognition.

LanguageModelWebSearch

Use a language model based on web search terms.

LanguageSwitchBalanced

A value to use for #EXTRA_ENABLE_LANGUAGE_SWITCH.

LanguageSwitchHighPrecision

A value to use for #EXTRA_ENABLE_LANGUAGE_SWITCH.

LanguageSwitchQuickResponse

A value to use for #EXTRA_ENABLE_LANGUAGE_SWITCH.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetVoiceDetailsIntent(Context)

Returns the broadcast intent to fire with Context#sendOrderedBroadcast(Intent, String, BroadcastReceiver, android.os.Handler, int, String, Bundle) to receive details from the package that implements voice search.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to