Methods Summary |
---|
public native void | detach()Detach from this module. The {@link SoundTrigger.StatusListener} callback will not be called
anymore and associated resources will be released.
|
protected void | finalize()
native_finalize();
|
public native int | loadSoundModel(SoundTrigger.SoundModel model, int[] soundModelHandle)Load a {@link SoundTrigger.SoundModel} to the hardware. A sound model must be loaded in
order to start listening to a key phrase in this model.
|
private native void | native_finalize()
|
private native void | native_setup(java.lang.Object module_this)
|
private static void | postEventFromNative(java.lang.Object module_ref, int what, int arg1, int arg2, java.lang.Object obj)
SoundTriggerModule module = (SoundTriggerModule)((WeakReference)module_ref).get();
if (module == null) {
return;
}
NativeEventHandlerDelegate delegate = module.mEventHandlerDelegate;
if (delegate != null) {
Handler handler = delegate.handler();
if (handler != null) {
Message m = handler.obtainMessage(what, arg1, arg2, obj);
handler.sendMessage(m);
}
}
|
public native int | startRecognition(int soundModelHandle, SoundTrigger.RecognitionConfig config)Start listening to all key phrases in a {@link SoundTrigger.SoundModel}.
Recognition must be restarted after each callback (success or failure) received on
the {@link SoundTrigger.StatusListener}.
|
public native int | stopRecognition(int soundModelHandle)Stop listening to all key phrases in a {@link SoundTrigger.SoundModel}
|
public native int | unloadSoundModel(int soundModelHandle)Unload a {@link SoundTrigger.SoundModel} and abort any pendiong recognition
|