2 * Copyright 2016 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package android.hardware.soundtrigger@2.0;
20 * Sound model types modes used in ISoundTriggerHw.SoundModel
22 enum SoundModelType : int32_t {
23 /** use for unspecified sound model type */
25 /** use for key phrase sound models */
27 /** use for all models other than keyphrase */
31 typedef int32_t SoundModelHandle;
35 * Recognition modes used in ISoundTriggerHw.RecognitionConfig,
36 * ISoundTriggerHw.Properties or PhraseRecognitionExtra
38 enum RecognitionMode : uint32_t {
39 /** simple voice trigger */
40 VOICE_TRIGGER = (1 << 0),
41 /** trigger only if one user in model identified */
42 USER_IDENTIFICATION = (1 << 1),
43 /** trigger only if one user in mode authenticated */
44 USER_AUTHENTICATION = (1 << 2),
45 /** generic sound trigger */
46 GENERIC_TRIGGER = (1 << 3),
50 * Confidence level for each user in structure PhraseRecognitionExtra
52 struct ConfidenceLevel {
55 /** confidence level in percent (0 - 100): */
56 /** - min level for recognition configuration */
57 /** - detected level for recognition event */
58 uint32_t levelPercent;
62 * Specialized recognition event for key phrase detection
64 struct PhraseRecognitionExtra {
67 /** recognition modes used for this keyphrase */
68 uint32_t recognitionModes;
69 /** confidence level for mode RecognitionMode.VOICE_TRIGGER */
70 uint32_t confidenceLevel;
72 * list of confidence levels per user for
73 * RecognitionMode.USER_IDENTIFICATION and
74 * RecognitionMode.USER_AUTHENTICATION */
75 vec<ConfidenceLevel> levels;