public final class SoundTriggerService.LocalSoundTriggerService extends SoundTriggerInternal
STATUS_ERROR, STATUS_OK
Modifier and Type | Method and Description |
---|---|
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
SoundTrigger.ModuleProperties |
getModuleProperties() |
int |
startRecognition(int keyphraseId,
SoundTrigger.KeyphraseSoundModel soundModel,
IRecognitionStatusCallback listener,
SoundTrigger.RecognitionConfig recognitionConfig)
Starts recognition for the given keyphraseId.
|
int |
stopRecognition(int keyphraseId,
IRecognitionStatusCallback listener)
Stops recognition for the given
SoundTrigger.Keyphrase if a recognition is
currently active. |
int |
unloadKeyphraseModel(int keyphraseId)
Unloads (and stops if running) the given keyphraseId
|
public int startRecognition(int keyphraseId, SoundTrigger.KeyphraseSoundModel soundModel, IRecognitionStatusCallback listener, SoundTrigger.RecognitionConfig recognitionConfig)
SoundTriggerInternal
startRecognition
in class SoundTriggerInternal
keyphraseId
- The identifier of the keyphrase for which
the recognition is to be started.soundModel
- The sound model to use for recognition.listener
- The listener for the recognition events related to the given keyphrase.SoundTriggerInternal.STATUS_ERROR
or SoundTriggerInternal.STATUS_OK
.public int stopRecognition(int keyphraseId, IRecognitionStatusCallback listener)
SoundTriggerInternal
SoundTrigger.Keyphrase
if a recognition is
currently active.stopRecognition
in class SoundTriggerInternal
keyphraseId
- The identifier of the keyphrase for which
the recognition is to be stopped.listener
- The listener for the recognition events related to the given keyphrase.SoundTriggerInternal.STATUS_ERROR
or SoundTriggerInternal.STATUS_OK
.public SoundTrigger.ModuleProperties getModuleProperties()
getModuleProperties
in class SoundTriggerInternal
public int unloadKeyphraseModel(int keyphraseId)
SoundTriggerInternal
unloadKeyphraseModel
in class SoundTriggerInternal
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
dump
in class SoundTriggerInternal