Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building node-addon for Windows x86. #1469

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

csukuangfj
Copy link
Collaborator

To fix the following errors on Windows x86:
https://github.com/csukuangfj/sherpa-onnx/actions/runs/11514071976/job/32051958194#step:9:140

  1>Checking Build System
  Building Custom Rule D:/a/sherpa-onnx/sherpa-onnx/scripts/node-addon-api/CMakeLists.txt
  audio-tagging.cc
  keyword-spotting.cc
  non-streaming-asr.cc
  non-streaming-speaker-diarization.cc
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\src\non-streaming-speaker-diarization.cc(245,10): error C2666: 'Napi::Object::operator []': 3 overloads have similar conversions [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(942,22): message : could be 'Napi::Value Napi::Object::operator [](uint32_t) const' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(938,22): message : or       'Napi::Value Napi::Object::operator [](const std::string &) const' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(934,22): message : or       'Napi::Value Napi::Object::operator [](const char *) const' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(930,49): message : or       'Napi::Object::PropertyLValue<uint32_t> Napi::Object::operator [](uint32_t)' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(926,52): message : or       'Napi::Object::PropertyLValue<std::string> Napi::Object::operator [](const std::string &)' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\node_modules\node-addon-api\napi-inl.h(922,52): message : or       'Napi::Object::PropertyLValue<std::string> Napi::Object::operator [](const char *)' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\src\non-streaming-speaker-diarization.cc(245,10): message : or       'built-in C++ operator[(napi_value, int)' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\src\non-streaming-speaker-diarization.cc(245,10): message : while trying to match the argument list '(Napi::Array, int32_t)' [D:\a\sherpa-onnx\sherpa-onnx\scripts\node-addon-api\build\sherpa-onnx.vcxproj]
  non-streaming-tts.cc

@csukuangfj csukuangfj merged commit 3d6344e into k2-fsa:master Oct 25, 2024
6 checks passed
@csukuangfj csukuangfj deleted the fix-win branch October 25, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant