Home
last modified time | relevance | path

Searched refs:soundModel (Results 1 – 25 of 26) sorted by relevance

12

/frameworks/base/services/tests/voiceinteractiontests/src/com/android/server/soundtrigger_middleware/
DSoundTriggerDuplicateModelHandlerTest.java76 final var soundModel = createSoundModelOne(); in loadSoundModel_throwsResourceContention_whenDuplicateUuid() local
79 mComponent.loadSoundModel(soundModel, mModelCallback); in loadSoundModel_throwsResourceContention_whenDuplicateUuid()
80 verify(mUnderlying).loadSoundModel(eq(soundModel), eq(mModelCallback)); in loadSoundModel_throwsResourceContention_whenDuplicateUuid()
95 final var soundModel = createSoundModelOne(); in loadSoundModel_doesNotThrowResourceContention_whenDifferentUuid() local
101 mComponent.loadSoundModel(soundModel, mModelCallback); in loadSoundModel_doesNotThrowResourceContention_whenDifferentUuid()
102 inOrder.verify(mUnderlying).loadSoundModel(eq(soundModel), eq(mModelCallback)); in loadSoundModel_doesNotThrowResourceContention_whenDifferentUuid()
113 final var soundModel = createSoundModelOne(); in loadSoundModel_doesNotThrow_afterDuplicateUuidHasBeenUnloaded() local
115 int handle = mComponent.loadSoundModel(soundModel, mModelCallback); in loadSoundModel_doesNotThrow_afterDuplicateUuidHasBeenUnloaded()
116 verify(mUnderlying).loadSoundModel(eq(soundModel), eq(mModelCallback)); in loadSoundModel_doesNotThrow_afterDuplicateUuidHasBeenUnloaded()
122 mComponent.loadSoundModel(soundModel, mModelCallback); in loadSoundModel_doesNotThrow_afterDuplicateUuidHasBeenUnloaded()
[all …]
/frameworks/base/tests/VoiceEnrollment/src/com/android/test/voiceenrollment/
DTestEnrollmentActivity.java70 KeyphraseSoundModel soundModel = new KeyphraseSoundModel(modelUuid, null, data, in onEnrollButtonClicked() local
72 boolean status = mEnrollmentUtil.addOrUpdateSoundModel(soundModel); in onEnrollButtonClicked()
87 KeyphraseSoundModel soundModel = mEnrollmentUtil.getSoundModel(KEYPHRASE_ID, BCP47_LOCALE); in onUnEnrollButtonClicked() local
88 if (soundModel == null) { in onUnEnrollButtonClicked()
94 Toast.makeText(this, "Successfully un-enrolled, model UUID=" + soundModel.getUuid(), in onUnEnrollButtonClicked()
107 KeyphraseSoundModel soundModel = mEnrollmentUtil.getSoundModel(KEYPHRASE_ID, BCP47_LOCALE); in onReEnrollButtonClicked() local
108 if (soundModel == null) { in onReEnrollButtonClicked()
115 KeyphraseSoundModel updated = new KeyphraseSoundModel(soundModel.getUuid(), in onReEnrollButtonClicked()
116 soundModel.getVendorUuid(), data, soundModel.getKeyphrases()); in onReEnrollButtonClicked()
DEnrollmentUtil.java89 public boolean addOrUpdateSoundModel(KeyphraseSoundModel soundModel) { in addOrUpdateSoundModel() argument
90 if (!verifyKeyphraseSoundModel(soundModel)) { in addOrUpdateSoundModel()
96 status = mModelManagementService.updateKeyphraseSoundModel(soundModel); in addOrUpdateSoundModel()
157 private boolean verifyKeyphraseSoundModel(KeyphraseSoundModel soundModel) { in verifyKeyphraseSoundModel() argument
158 if (soundModel == null) { in verifyKeyphraseSoundModel()
162 if (soundModel.getUuid() == null) { in verifyKeyphraseSoundModel()
166 if (soundModel.getData() == null) { in verifyKeyphraseSoundModel()
170 if (soundModel.getKeyphrases() == null || soundModel.getKeyphrases().length != 1) { in verifyKeyphraseSoundModel()
174 Keyphrase keyphrase = soundModel.getKeyphrases()[0]; in verifyKeyphraseSoundModel()
/frameworks/base/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/
DSoundTriggerUtil.java58 public boolean addOrUpdateSoundModel(SoundTriggerManager.Model soundModel) { in addOrUpdateSoundModel() argument
59 if (soundModel == null) { in addOrUpdateSoundModel()
62 mSoundTriggerManager.updateModel(soundModel); in addOrUpdateSoundModel()
67 .loadSoundModel(getGenericSoundModel(soundModel)) == 0; in addOrUpdateSoundModel()
71 SoundTriggerManager.Model soundModel) { in getGenericSoundModel() argument
76 return (GenericSoundModel) method.invoke(soundModel); in getGenericSoundModel()
78 Log.e(TAG, "Failed to getGenericSoundModel: " + soundModel, e); in getGenericSoundModel()
DSoundTriggerTestService.java256 SoundTriggerManager.Model soundModel = createNewSoundModel(modelInfo); in loadModel() local
258 boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(soundModel); in loadModel()
261 + soundModel.getModelUuid()); in loadModel()
265 + soundModel.getModelUuid() + "!"); in loadModel()
279 SoundTriggerManager.Model soundModel = mSoundTriggerUtil.getSoundModel(modelUuid); in unloadModel() local
280 if (soundModel == null) { in unloadModel()
288 + soundModel.getModelUuid()); in unloadModel()
292 modelInfo.name + ", UUID=" + soundModel.getModelUuid() + "!"); in unloadModel()
304 SoundTriggerManager.Model soundModel = mSoundTriggerUtil.getSoundModel(modelUuid); in reloadModel() local
305 if (soundModel == null) { in reloadModel()
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger/
DSoundTriggerService.java546 public int startRecognition(GenericSoundModel soundModel, in startRecognition() argument
549 mEventLogger.enqueue(new SessionEvent(Type.START_RECOGNITION, getUuid(soundModel))); in startRecognition()
554 if (soundModel == null) { in startRecognition()
556 getUuid(soundModel), "Invalid sound model").printLog(ALOGW, TAG)); in startRecognition()
564 int ret = mSoundTriggerHelper.startGenericRecognition(soundModel.getUuid(), in startRecognition()
565 soundModel, in startRecognition()
568 mSoundModelStatTracker.onStart(soundModel.getUuid()); in startRecognition()
599 public void updateSoundModel(SoundTrigger.GenericSoundModel soundModel) { in updateSoundModel() argument
600 mEventLogger.enqueue(new SessionEvent(Type.UPDATE_MODEL, getUuid(soundModel))); in updateSoundModel()
603 mDbHelper.updateGenericSoundModel(soundModel); in updateSoundModel()
[all …]
DSoundTriggerDbHelper.java85 public boolean updateGenericSoundModel(GenericSoundModel soundModel) { in updateGenericSoundModel() argument
89 values.put(GenericSoundModelContract.KEY_MODEL_UUID, soundModel.getUuid().toString()); in updateGenericSoundModel()
91 soundModel.getVendorUuid().toString()); in updateGenericSoundModel()
92 values.put(GenericSoundModelContract.KEY_DATA, soundModel.getData()); in updateGenericSoundModel()
93 values.put(GenericSoundModelContract.KEY_MODEL_VERSION, soundModel.getVersion()); in updateGenericSoundModel()
137 GenericSoundModel soundModel = getGenericSoundModel(model_uuid); in deleteGenericSoundModel() local
138 if (soundModel == null) { in deleteGenericSoundModel()
144 + "='" + soundModel.getUuid().toString() + "'"; in deleteGenericSoundModel()
DSoundTriggerHelper.java152 public int startGenericRecognition(UUID modelId, GenericSoundModel soundModel, in startGenericRecognition() argument
156 if (modelId == null || soundModel == null || callback == null || in startGenericRecognition()
171 return startRecognition(soundModel, modelData, callback, recognitionConfig, in startGenericRecognition()
185 public int startKeyphraseRecognition(int keyphraseId, KeyphraseSoundModel soundModel, in startKeyphraseRecognition() argument
190 if (soundModel == null || callback == null || recognitionConfig == null) { in startKeyphraseRecognition()
205 if (model != null && !model.getModelId().equals(soundModel.getUuid())) { in startKeyphraseRecognition()
218 model = createKeyphraseModelDataLocked(soundModel.getUuid(), keyphraseId); in startKeyphraseRecognition()
221 return startRecognition(soundModel, model, callback, recognitionConfig, in startKeyphraseRecognition()
275 private int startRecognition(SoundModel soundModel, ModelData modelData, in startRecognition() argument
302 if (modelData.getSoundModel().equals(soundModel) && modelData.isModelStarted()) { in startRecognition()
[all …]
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger_middleware/
DSoundTriggerDuplicateModelHandler.java96 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
98 checkDuplicateModelUuid(soundModel.uuid); in loadSoundModel()
99 var result = mDelegate.loadSoundModel(soundModel, callback); in loadSoundModel()
100 mModelList.add(new ModelData(result, soundModel.uuid)); in loadSoundModel()
106 public int loadPhraseSoundModel(PhraseSoundModel soundModel, ModelCallback callback) { in loadPhraseSoundModel() argument
108 checkDuplicateModelUuid(soundModel.common.uuid); in loadPhraseSoundModel()
109 var result = mDelegate.loadPhraseSoundModel(soundModel, callback); in loadPhraseSoundModel()
110 mModelList.add(new ModelData(result, soundModel.common.uuid)); in loadPhraseSoundModel()
DHw2CompatUtil.java31 android.hardware.soundtrigger.V2_1.ISoundTriggerHw.SoundModel soundModel) { in convertSoundModel_2_1_to_2_0() argument
32 android.hardware.soundtrigger.V2_0.ISoundTriggerHw.SoundModel model_2_0 = soundModel.header; in convertSoundModel_2_1_to_2_0()
34 model_2_0.data = HidlMemoryUtil.hidlMemoryToByteList(soundModel.data); in convertSoundModel_2_1_to_2_0()
61 android.hardware.soundtrigger.V2_1.ISoundTriggerHw.PhraseSoundModel soundModel) { in convertPhraseSoundModel_2_1_to_2_0() argument
64 model_2_0.common = convertSoundModel_2_1_to_2_0(soundModel.common); in convertPhraseSoundModel_2_1_to_2_0()
65 model_2_0.phrases = soundModel.phrases; in convertPhraseSoundModel_2_1_to_2_0()
DSoundTriggerHalMaxModelLimiter.java73 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
78 int result = mDelegate.loadSoundModel(soundModel, callback); in loadSoundModel()
85 public int loadPhraseSoundModel(PhraseSoundModel soundModel, in loadPhraseSoundModel() argument
91 int result = mDelegate.loadPhraseSoundModel(soundModel, callback); in loadPhraseSoundModel()
DSoundTriggerHalWatchdog.java61 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
63 return mUnderlying.loadSoundModel(soundModel, callback); in loadSoundModel()
68 public int loadPhraseSoundModel(PhraseSoundModel soundModel, in loadPhraseSoundModel() argument
71 return mUnderlying.loadPhraseSoundModel(soundModel, callback); in loadPhraseSoundModel()
DISoundTriggerHal.java75 int loadSoundModel(SoundModel soundModel, ModelCallback callback); in loadSoundModel() argument
81 int loadPhraseSoundModel(PhraseSoundModel soundModel, ModelCallback callback); in loadPhraseSoundModel() argument
DSoundTriggerHw3Compat.java67 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
69 return mDriver.loadSoundModel(soundModel, new ModelCallbackAdaper(callback)); in loadSoundModel()
81 public int loadPhraseSoundModel(PhraseSoundModel soundModel, ModelCallback callback) { in loadPhraseSoundModel() argument
83 return mDriver.loadPhraseSoundModel(soundModel, new ModelCallbackAdaper(callback)); in loadPhraseSoundModel()
DSoundTriggerHalEnforcer.java81 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
84 int handle = mUnderlying.loadSoundModel(soundModel, in loadSoundModel()
95 public int loadPhraseSoundModel(PhraseSoundModel soundModel, ModelCallback callback) { in loadPhraseSoundModel() argument
98 int handle = mUnderlying.loadPhraseSoundModel(soundModel, in loadPhraseSoundModel()
DSoundTriggerHw2Compat.java214 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
216 ConversionUtil.aidl2hidlSoundModel(soundModel); in loadSoundModel()
250 public int loadPhraseSoundModel(PhraseSoundModel soundModel, ModelCallback callback) { in loadPhraseSoundModel() argument
252 ConversionUtil.aidl2hidlPhraseSoundModel(soundModel); in loadPhraseSoundModel()
447 android.hardware.soundtrigger.V2_1.ISoundTriggerHw.SoundModel soundModel, in loadSoundModel_2_0() argument
452 Hw2CompatUtil.convertSoundModel_2_1_to_2_0(soundModel); in loadSoundModel_2_0()
466 android.hardware.soundtrigger.V2_1.ISoundTriggerHw.PhraseSoundModel soundModel, in loadPhraseSoundModel_2_0() argument
471 Hw2CompatUtil.convertPhraseSoundModel_2_1_to_2_0(soundModel); in loadPhraseSoundModel_2_0()
DSoundTriggerHalConcurrentCaptureHandler.java195 public int loadSoundModel(SoundModel soundModel, ModelCallback callback) { in loadSoundModel() argument
196 int handle = mDelegate.loadSoundModel(soundModel, new CallbackWrapper(callback)); in loadSoundModel()
202 public int loadPhraseSoundModel(PhraseSoundModel soundModel, in loadPhraseSoundModel() argument
204 int handle = mDelegate.loadPhraseSoundModel(soundModel, new CallbackWrapper(callback)); in loadPhraseSoundModel()
DFakeSoundTriggerHal.java404 public int loadSoundModel(SoundModel soundModel, in loadSoundModel() argument
417 cb.onSoundModelLoaded(soundModel, null, session, mGlobalEventSession)); in loadSoundModel()
423 public int loadPhraseSoundModel(PhraseSoundModel soundModel, in loadPhraseSoundModel() argument
437 cb.onSoundModelLoaded(soundModel.common, soundModel.phrases, session, in loadPhraseSoundModel()
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/
DDatabaseHelper.java157 public boolean updateKeyphraseSoundModel(KeyphraseSoundModel soundModel) { in updateKeyphraseSoundModel() argument
161 values.put(SoundModelContract.KEY_MODEL_UUID, soundModel.getUuid().toString()); in updateKeyphraseSoundModel()
162 if (soundModel.getVendorUuid() != null) { in updateKeyphraseSoundModel()
164 soundModel.getVendorUuid().toString()); in updateKeyphraseSoundModel()
167 values.put(SoundModelContract.KEY_DATA, soundModel.getData()); in updateKeyphraseSoundModel()
168 values.put(SoundModelContract.KEY_MODEL_VERSION, soundModel.getVersion()); in updateKeyphraseSoundModel()
170 if (soundModel.getKeyphrases() != null && soundModel.getKeyphrases().length == 1) { in updateKeyphraseSoundModel()
172 soundModel.getKeyphrases()[0].getId()); in updateKeyphraseSoundModel()
174 soundModel.getKeyphrases()[0].getRecognitionModes()); in updateKeyphraseSoundModel()
176 getCommaSeparatedString(soundModel.getKeyphrases()[0].getUsers())); in updateKeyphraseSoundModel()
[all …]
DTestModelEnrollmentDatabase.java98 public boolean updateKeyphraseSoundModel(KeyphraseSoundModel soundModel) { in updateKeyphraseSoundModel() argument
99 final Keyphrase keyphrase = soundModel.getKeyphrases()[0]; in updateKeyphraseSoundModel()
103 soundModel); in updateKeyphraseSoundModel()
DIEnrolledModelDb.java43 boolean updateKeyphraseSoundModel(KeyphraseSoundModel soundModel); in updateKeyphraseSoundModel() argument
/frameworks/base/core/java/com/android/internal/app/
DISoundTriggerSession.aidl35 void updateSoundModel(in SoundTrigger.GenericSoundModel soundModel); in updateSoundModel() argument
39 int startRecognition(in SoundTrigger.GenericSoundModel soundModel, in startRecognition() argument
45 int loadGenericSoundModel(in SoundTrigger.GenericSoundModel soundModel); in loadGenericSoundModel() argument
46 int loadKeyphraseSoundModel(in SoundTrigger.KeyphraseSoundModel soundModel); in loadKeyphraseSoundModel() argument
/frameworks/base/media/java/android/media/soundtrigger/
DSoundTriggerManager.java473 public int loadSoundModel(@NonNull SoundModel soundModel) { in loadSoundModel() argument
479 switch (soundModel.getType()) { in loadSoundModel()
482 (GenericSoundModel) soundModel); in loadSoundModel()
485 (KeyphraseSoundModel) soundModel); in loadSoundModel()
DSoundTriggerDetector.java283 @NonNull GenericSoundModel soundModel, in SoundTriggerDetector() argument
286 mSoundModel = soundModel; in SoundTriggerDetector()
/frameworks/base/services/core/java/com/android/server/
DSoundTriggerInternal.java75 int startRecognition(int keyphraseId, KeyphraseSoundModel soundModel, in startRecognition() argument

12