public abstract class SoundTriggerInternal extends Object
VoiceInteractionManagerService
.Modifier and Type | Field and Description |
---|---|
static int |
STATUS_ERROR
Return codes for
#startRecognition(int, KeyphraseSoundModel,
IRecognitionStatusCallback, RecognitionConfig) ,
stopRecognition(int, IRecognitionStatusCallback) |
static int |
STATUS_OK |
Constructor and Description |
---|
SoundTriggerInternal() |
Modifier and Type | Method and Description |
---|---|
abstract void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
abstract SoundTrigger.ModuleProperties |
getModuleProperties() |
abstract int |
startRecognition(int keyphraseId,
SoundTrigger.KeyphraseSoundModel soundModel,
IRecognitionStatusCallback listener,
SoundTrigger.RecognitionConfig recognitionConfig)
Starts recognition for the given keyphraseId.
|
abstract int |
stopRecognition(int keyphraseId,
IRecognitionStatusCallback listener)
Stops recognition for the given
SoundTrigger.Keyphrase if a recognition is
currently active. |
abstract int |
unloadKeyphraseModel(int keyphaseId)
Unloads (and stops if running) the given keyphraseId
|
public static final int STATUS_ERROR
#startRecognition(int, KeyphraseSoundModel,
IRecognitionStatusCallback, RecognitionConfig)
,
stopRecognition(int, IRecognitionStatusCallback)
public static final int STATUS_OK
public abstract int startRecognition(int keyphraseId, SoundTrigger.KeyphraseSoundModel soundModel, IRecognitionStatusCallback listener, SoundTrigger.RecognitionConfig recognitionConfig)
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.STATUS_ERROR
or STATUS_OK
.public abstract int stopRecognition(int keyphraseId, IRecognitionStatusCallback listener)
SoundTrigger.Keyphrase
if a recognition is
currently active.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.STATUS_ERROR
or STATUS_OK
.public abstract SoundTrigger.ModuleProperties getModuleProperties()
public abstract int unloadKeyphraseModel(int keyphaseId)
public abstract void dump(FileDescriptor fd, PrintWriter pw, String[] args)