1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//build/ohos/ace/ace.gni") 16 17js_declaration("intelligentvoice_js") { 18 part_name = "intelligent_voice_framework" 19 sources = [ "//foundation/ai/intelligent_voice_framework/interfaces/kits/js/@ohos.ai.intelligentVoice.d.ts" ] 20} 21 22ohos_copy("intelligentvoice_declaration") { 23 sources = [ "//foundation/ai/intelligent_voice_framework/interfaces/kits/js/@ohos.ai.intelligentVoice.d.ts" ] 24 outputs = [ target_out_dir + "/$target_name/" ] 25 module_source_dir = target_out_dir + "/$target_name" 26 module_install_name = "" 27} 28 29ohos_shared_library("intelligentvoice") { 30 sources = [ 31 "napi/engine_event_callback_napi.cpp", 32 "napi/enroll_intell_voice_engine_callback_napi.cpp", 33 "napi/enroll_intell_voice_engine_napi.cpp", 34 "napi/intell_voice_common_napi.cpp", 35 "napi/intell_voice_manager_napi.cpp", 36 "napi/intell_voice_napi_queue.cpp", 37 "napi/intell_voice_napi_util.cpp", 38 "napi/intell_voice_update_callback_napi.cpp", 39 "napi/service_change_callback_napi.cpp", 40 "napi/wakeup_intell_voice_engine_napi.cpp", 41 "napi/wakeup_manager_napi.cpp", 42 ] 43 44 include_dirs = [ 45 "../../interfaces/inner_api/native", 46 "../../services/intell_voice_service/inc", 47 "../../services/intell_voice_engine/proxy", 48 "../../utils", 49 "napi", 50 ] 51 52 cflags_cc = [ 53 "-Wno-error=unused-parameter", 54 "-DHILOG_ENABLE", 55 "-DENABLE_DEBUG", 56 ] 57 58 deps = [ 59 "../../frameworks/native:intellvoice_native", 60 "../../services:intell_voice_proxy", 61 ] 62 63 external_deps = [ 64 "ability_base:want", 65 "access_token:libaccesstoken_sdk", 66 "access_token:libtokenid_sdk", 67 "c_utils:utils", 68 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers_1.0", 69 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers_1.1", 70 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers_1.2", 71 "hilog:libhilog", 72 "ipc:ipc_core", 73 "napi:ace_napi", 74 "safwk:system_ability_fwk", 75 "samgr:samgr_proxy", 76 ] 77 78 relative_install_dir = "module/ai" 79 subsystem_name = "ai" 80 part_name = "intelligent_voice_framework" 81} 82