Fix building node-addon package (#1598)

This commit is contained in:
Fangjun Kuang
2024-12-06 10:11:18 +08:00
committed by GitHub
parent 9352ccf7d5
commit 84821b1f99
3 changed files with 5 additions and 5 deletions

View File

@@ -406,7 +406,9 @@ class TtsGenerateWorker : public Napi::AsyncWorker {
for (auto d : _this->data_list_) { for (auto d : _this->data_list_) {
if (d->cancelled) { if (d->cancelled) {
#if __OHOS__
OH_LOG_INFO(LOG_APP, "TtsGenerate is cancelled"); OH_LOG_INFO(LOG_APP, "TtsGenerate is cancelled");
#endif
return 0; return 0;
} }
} }

View File

@@ -11,9 +11,7 @@ cmake_policy(SET CMP0042 NEW)
project(sherpa-onnx) project(sherpa-onnx)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 17)
add_definitions(-DNAPI_VERSION=3)
include_directories(${CMAKE_JS_INC}) include_directories(${CMAKE_JS_INC})

View File

@@ -3,8 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"description": "Speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without internet connection", "description": "Speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without internet connection",
"dependencies": { "dependencies": {
"cmake-js": "^6.0.0", "cmake-js": "^7.0.0",
"node-addon-api": "^1.1.0", "node-addon-api": "^8.3.0",
"perf_hooks": "*" "perf_hooks": "*"
}, },
"scripts": { "scripts": {