RecognizerIntent.ExtraAudioSource Field

Definition

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

[Android.Runtime.Register("EXTRA_AUDIO_SOURCE", ApiSince=33)]
public const string ExtraAudioSource;
[<Android.Runtime.Register("EXTRA_AUDIO_SOURCE", ApiSince=33)>]
val mutable ExtraAudioSource : string

Field Value

Attributes

Remarks

Optional android.os.ParcelFileDescriptor pointing to an already opened audio source for the recognizer to use. The caller of the recognizer is responsible for closing the audio. If this extra is not set or the recognizer does not support this feature, the recognizer will open the mic for audio and close it when the recognition is finished.

Along with this extra, please send #EXTRA_AUDIO_SOURCE_CHANNEL_COUNT, #EXTRA_AUDIO_SOURCE_ENCODING, and #EXTRA_AUDIO_SOURCE_SAMPLING_RATE extras, otherwise the default values of these extras will be used.

Additionally, #EXTRA_ENABLE_BIASING_DEVICE_CONTEXT may have no effect when this extra is set.

This can also be used as the string value for #EXTRA_SEGMENTED_SESSION to enable segmented session mode. The audio must be passed in using this extra. The recognition session will end when and only when the audio is closed.

Java documentation for android.speech.RecognizerIntent.EXTRA_AUDIO_SOURCE.

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