• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef INTELL_VOICE_DEFINITIONS_H
16 #define INTELL_VOICE_DEFINITIONS_H
17 #include <string>
18 #include "intell_voice_util.h"
19 namespace OHOS {
20 namespace IntellVoiceEngine {
21 constexpr int32_t VOICE_WAKEUP_MODEL_UUID = 1;
22 constexpr int32_t PROXIMAL_WAKEUP_MODEL_UUID = 2;
23 const std::string WAKEUP_KEY = "intell_voice_trigger_enabled";
24 const std::string WHISPER_KEY = "intell_voice_trigger_whisper";
25 const std::string SHORTWORD_KEY = "intell_voice_trigger_shortword";
26 const std::string SENSIBILITY_TEXT = "sensibility=";
27 
28 const std::string KEY_GET_WAKEUP_FEATURE = "wakeup_features";
29 const std::string KEY_WAKEUP_VESRION = "WakeupVersion";
30 const std::string KEY_LANGUAGE = "Language";
31 const std::string KEY_AREA = "Area";
32 const std::string KEY_WAKEUP_PHRASE = "WakeupPhrase";
33 const std::string KEY_ENROLL_ENGINE_UID = "EnrollEngineUid";
34 const std::string KEY_SENSIBILITY = "Sensibility";
35 const std::string KEY_WAKEUP_DSP_FEATURE = "WakeupDspFeature";
36 const std::string KEY_WHISPER_VPR = "WhisperVpr";
37 
38 static const std::string WHISPER_MODEL_PATH_VDE =
39     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/dsp/whisper_wakeup_dsp_config_vde";
40 static const std::string WHISPER_VPR_CONFIG_PATH =
41     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/vpr/whisper/vpr_domainDict_04.dat";
42 static const std::string WHISPER_MODEL_PATH =
43     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/dsp/whisper_wakeup_dsp_config";
44 static const std::string VAD_MODEL_PATH =
45     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/ap/kws2_acousticsModel6.pb";
46 static const std::string WAKEUP_CONFIG_USER_PATH =
47     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/ap/wakeup_config_user.json";
48 static const std::string WAKEUP_CONFIG_PATH =
49     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/ap/wakeup_config.json";
50 static const std::string SINGLE_LEVEL_MODEL_PATH =
51     "/sys_prod/variant/region_comm/china/etc/intellvoice/wakeup/dsp/wakeup_dsp_config";
52 }  // namespace IntellVoice
53 namespace IntellVoiceTrigger {
54     enum TriggerModelType {
55         UNKNOWN_TYPE = -1,
56         GENERIC_TYPE = 1,
57         VOICE_WAKEUP_TYPE = 1,
58         PROXIMAL_WAKEUP_TYPE = 2,
59     };
60 } // namespace IntellVoice
61 }  // namespace OHOS
62 #endif