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/service_change_callback_napi.cpp", 39 "napi/wakeup_intell_voice_engine_napi.cpp", 40 ] 41 42 include_dirs = [ 43 "../../../../arkui/napi/interfaces/kits", 44 "../../interfaces/inner_api/native", 45 "../../services/intell_voice_engine", 46 "../../services/intell_voice_engine/proxy", 47 "../../utils", 48 "napi", 49 ] 50 51 cflags_cc = [ 52 "-Wno-error=unused-parameter", 53 "-DHILOG_ENABLE", 54 "-DENABLE_DEBUG", 55 ] 56 57 deps = [ 58 "../../frameworks/native:intellvoice_native", 59 "../../services:intell_voice_proxy", 60 ] 61 62 external_deps = [ 63 "ability_base:want", 64 "c_utils:utils", 65 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers", 66 "hilog:libhilog", 67 "ipc:ipc_core", 68 "napi:ace_napi", 69 "safwk:system_ability_fwk", 70 "samgr:samgr_proxy", 71 ] 72 73 relative_install_dir = "module/ai" 74 subsystem_name = "ai" 75 part_name = "intelligent_voice_framework" 76} 77