Skip to content

Commit

Permalink
Fix building node-addon package (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Dec 6, 2024
1 parent 9352ccf commit 84821b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ class TtsGenerateWorker : public Napi::AsyncWorker {

for (auto d : _this->data_list_) {
if (d->cancelled) {
#if __OHOS__
OH_LOG_INFO(LOG_APP, "TtsGenerate is cancelled");
#endif
return 0;
}
}
Expand Down
4 changes: 1 addition & 3 deletions scripts/node-addon-api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ cmake_policy(SET CMP0042 NEW)

project(sherpa-onnx)

set(CMAKE_CXX_STANDARD 14)

add_definitions(-DNAPI_VERSION=3)
set(CMAKE_CXX_STANDARD 17)

include_directories(${CMAKE_JS_INC})

Expand Down
4 changes: 2 additions & 2 deletions scripts/node-addon-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.0.0",
"description": "Speech-to-text, text-to-speech, and speaker diarization using Next-gen Kaldi without internet connection",
"dependencies": {
"cmake-js": "^6.0.0",
"node-addon-api": "^1.1.0",
"cmake-js": "^7.0.0",
"node-addon-api": "^8.3.0",
"perf_hooks": "*"
},
"scripts": {
Expand Down

0 comments on commit 84821b1

Please sign in to comment.