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