Home
last modified time | relevance | path

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

/frameworks/base/tests/VoiceEnrollment/src/com/android/test/voiceenrollment/
DTestEnrollmentActivity.java65 KeyphraseSoundModel soundModel = new KeyphraseSoundModel(modelUuid, null, data, in onEnrollButtonClicked() local
67 boolean status = mEnrollmentUtil.addOrUpdateSoundModel(soundModel); in onEnrollButtonClicked()
82 KeyphraseSoundModel soundModel = mEnrollmentUtil.getSoundModel(KEYPHRASE_ID, BCP47_LOCALE); in onUnEnrollButtonClicked() local
83 if (soundModel == null) { in onUnEnrollButtonClicked()
89 Toast.makeText(this, "Successfully un-enrolled, model UUID=" + soundModel.uuid, in onUnEnrollButtonClicked()
102 KeyphraseSoundModel soundModel = mEnrollmentUtil.getSoundModel(KEYPHRASE_ID, BCP47_LOCALE); in onReEnrollButtonClicked() local
103 if (soundModel == null) { in onReEnrollButtonClicked()
110 KeyphraseSoundModel updated = new KeyphraseSoundModel(soundModel.uuid, in onReEnrollButtonClicked()
111 soundModel.vendorUuid, data, soundModel.keyphrases); 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.uuid == null) { in verifyKeyphraseSoundModel()
166 if (soundModel.data == null) { in verifyKeyphraseSoundModel()
170 if (soundModel.keyphrases == null || soundModel.keyphrases.length != 1) { in verifyKeyphraseSoundModel()
174 Keyphrase keyphrase = soundModel.keyphrases[0]; in verifyKeyphraseSoundModel()
/frameworks/base/services/voiceinteraction/java/com/android/server/soundtrigger/
DSoundTriggerService.java316 public void updateSoundModel(SoundTrigger.GenericSoundModel soundModel) { in updateSoundModel() argument
319 Slog.i(TAG, "updateSoundModel(): model = " + soundModel); in updateSoundModel()
323 + soundModel)); in updateSoundModel()
325 mDbHelper.updateGenericSoundModel(soundModel); in updateSoundModel()
347 public int loadGenericSoundModel(GenericSoundModel soundModel) { in loadGenericSoundModel() argument
350 if (soundModel == null || soundModel.uuid == null) { in loadGenericSoundModel()
359 Slog.i(TAG, "loadGenericSoundModel(): id = " + soundModel.uuid); in loadGenericSoundModel()
363 + soundModel.uuid)); in loadGenericSoundModel()
366 SoundModel oldModel = mLoadedModels.get(soundModel.uuid); in loadGenericSoundModel()
370 if (oldModel != null && !oldModel.equals(soundModel)) { in loadGenericSoundModel()
[all …]
DSoundTriggerDbHelper.java82 public boolean updateGenericSoundModel(GenericSoundModel soundModel) { in updateGenericSoundModel() argument
86 values.put(GenericSoundModelContract.KEY_MODEL_UUID, soundModel.uuid.toString()); in updateGenericSoundModel()
87 values.put(GenericSoundModelContract.KEY_VENDOR_UUID, soundModel.vendorUuid.toString()); in updateGenericSoundModel()
88 values.put(GenericSoundModelContract.KEY_DATA, soundModel.data); in updateGenericSoundModel()
130 GenericSoundModel soundModel = getGenericSoundModel(model_uuid); in deleteGenericSoundModel() local
131 if (soundModel == null) { in deleteGenericSoundModel()
137 + "='" + soundModel.uuid.toString() + "'"; in deleteGenericSoundModel()
DSoundTriggerHelper.java142 int startGenericRecognition(UUID modelId, GenericSoundModel soundModel, in startGenericRecognition() argument
145 if (modelId == null || soundModel == null || callback == null || in startGenericRecognition()
157 return startRecognition(soundModel, modelData, callback, recognitionConfig, in startGenericRecognition()
171 int startKeyphraseRecognition(int keyphraseId, KeyphraseSoundModel soundModel, in startKeyphraseRecognition() argument
175 if (soundModel == null || callback == null || recognitionConfig == null) { in startKeyphraseRecognition()
181 + " soundModel=" + soundModel + ", callback=" + callback.asBinder() in startKeyphraseRecognition()
194 if (model != null && !model.getModelId().equals(soundModel.uuid)) { in startKeyphraseRecognition()
207 model = createKeyphraseModelDataLocked(soundModel.uuid, keyphraseId); in startKeyphraseRecognition()
210 return startRecognition(soundModel, model, callback, recognitionConfig, in startKeyphraseRecognition()
239 int startRecognition(SoundModel soundModel, ModelData modelData, in startRecognition() argument
[all …]
DSoundTriggerInternal.java56 public abstract int startRecognition(int keyphraseId, KeyphraseSoundModel soundModel, in startRecognition() argument
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/
DDatabaseHelper.java148 public boolean updateKeyphraseSoundModel(KeyphraseSoundModel soundModel) { in updateKeyphraseSoundModel() argument
152 values.put(SoundModelContract.KEY_MODEL_UUID, soundModel.uuid.toString()); in updateKeyphraseSoundModel()
153 if (soundModel.vendorUuid != null) { in updateKeyphraseSoundModel()
154 values.put(SoundModelContract.KEY_VENDOR_UUID, soundModel.vendorUuid.toString()); in updateKeyphraseSoundModel()
157 values.put(SoundModelContract.KEY_DATA, soundModel.data); in updateKeyphraseSoundModel()
159 if (soundModel.keyphrases != null && soundModel.keyphrases.length == 1) { in updateKeyphraseSoundModel()
160 values.put(SoundModelContract.KEY_KEYPHRASE_ID, soundModel.keyphrases[0].id); in updateKeyphraseSoundModel()
162 soundModel.keyphrases[0].recognitionModes); in updateKeyphraseSoundModel()
164 getCommaSeparatedString(soundModel.keyphrases[0].users)); in updateKeyphraseSoundModel()
165 values.put(SoundModelContract.KEY_LOCALE, soundModel.keyphrases[0].locale); in updateKeyphraseSoundModel()
[all …]
DVoiceInteractionManagerService.java1011 KeyphraseSoundModel soundModel = in startRecognition() local
1013 if (soundModel == null in startRecognition()
1014 || soundModel.uuid == null in startRecognition()
1015 || soundModel.keyphrases == null) { in startRecognition()
1025 keyphraseId, soundModel, callback, recognitionConfig); in startRecognition()
/frameworks/base/core/java/com/android/internal/app/
DISoundTriggerService.aidl34 void updateSoundModel(in SoundTrigger.GenericSoundModel soundModel); in updateSoundModel() argument
43 int loadGenericSoundModel(in SoundTrigger.GenericSoundModel soundModel); in loadGenericSoundModel() argument
44 int loadKeyphraseSoundModel(in SoundTrigger.KeyphraseSoundModel soundModel); in loadKeyphraseSoundModel() argument
/frameworks/base/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/
DSoundTriggerUtil.java58 public boolean addOrUpdateSoundModel(GenericSoundModel soundModel) { in addOrUpdateSoundModel() argument
60 if (soundModel == null) { in addOrUpdateSoundModel()
63 mSoundTriggerService.updateSoundModel(soundModel); in addOrUpdateSoundModel()
DSoundTriggerTestService.java249 GenericSoundModel soundModel = createNewSoundModel(modelInfo); in loadModel() local
251 boolean status = mSoundTriggerUtil.addOrUpdateSoundModel(soundModel); in loadModel()
253 postToast("Successfully loaded " + modelInfo.name + ", UUID=" + soundModel.uuid); in loadModel()
256 postErrorToast("Failed to load " + modelInfo.name + ", UUID=" + soundModel.uuid + "!"); in loadModel()
270 GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid); in unloadModel() local
271 if (soundModel == null) { in unloadModel()
278 postToast("Successfully unloaded " + modelInfo.name + ", UUID=" + soundModel.uuid); in unloadModel()
282 modelInfo.name + ", UUID=" + soundModel.uuid + "!"); in unloadModel()
294 GenericSoundModel soundModel = mSoundTriggerUtil.getSoundModel(modelUuid); in reloadModel() local
295 if (soundModel == null) { in reloadModel()
/frameworks/av/services/soundtrigger/
DSoundTriggerHalHidl.cpp552 const struct sound_trigger_sound_model *soundModel) in convertSoundModelToHal() argument
554 halModel->type = (SoundModelType)soundModel->type; in convertSoundModelToHal()
555 convertUuidToHal(&halModel->uuid, &soundModel->uuid); in convertSoundModelToHal()
556 convertUuidToHal(&halModel->vendorUuid, &soundModel->vendor_uuid); in convertSoundModelToHal()
557 …halModel->data.setToExternal((uint8_t *)soundModel + soundModel->data_offset, soundModel->data_siz… in convertSoundModelToHal()
562 const struct sound_trigger_sound_model *soundModel) in convertSoundModelToHal() argument
564 convertSoundModelToHal(&halModel->header, soundModel); in convertSoundModelToHal()
570 const struct sound_trigger_sound_model *soundModel) in convertPhraseSoundModelToHal() argument
573 (struct sound_trigger_phrase_sound_model *)soundModel; in convertPhraseSoundModelToHal()
575 convertSoundModelToHal(&halKeyPhraseModel->common, soundModel); in convertPhraseSoundModelToHal()
[all …]
DSoundTriggerHalHidl.h158 const struct sound_trigger_sound_model *soundModel);
161 const struct sound_trigger_sound_model *soundModel)
164 const struct sound_trigger_sound_model *soundModel);
167 const struct sound_trigger_sound_model *soundModel)
/frameworks/base/media/java/android/media/soundtrigger/
DSoundTriggerManager.java243 public int loadSoundModel(SoundModel soundModel) { in loadSoundModel() argument
244 if (soundModel == null) { in loadSoundModel()
249 switch (soundModel.type) { in loadSoundModel()
252 (GenericSoundModel) soundModel); in loadSoundModel()
255 (KeyphraseSoundModel) soundModel); in loadSoundModel()