added in API level 21

AlwaysOnHotwordDetector.EventPayload

public static class AlwaysOnHotwordDetector.EventPayload
extends Object

java.lang.Object
   ↳ android.service.voice.AlwaysOnHotwordDetector.EventPayload


Additional payload for AlwaysOnHotwordDetector.Callback.onDetected(AlwaysOnHotwordDetector.EventPayload).

Summary

Public methods

AudioFormat getCaptureAudioFormat()

Gets the format of the audio obtained using getTriggerAudio().

byte[] getTriggerAudio()

Gets the raw audio that triggered the keyphrase.

Inherited methods

Public methods

getCaptureAudioFormat

added in API level 21
public AudioFormat getCaptureAudioFormat ()

Gets the format of the audio obtained using getTriggerAudio(). May be null if there's no audio present.

Returns
AudioFormat

This value may be null.

getTriggerAudio

added in API level 21
public byte[] getTriggerAudio ()

Gets the raw audio that triggered the keyphrase. This may be null if the trigger audio isn't available. If non-null, the format of the audio can be obtained by calling getCaptureAudioFormat().

Returns
byte[]

This value may be null.