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 windows build error #204

Merged
merged 3 commits into from
Sep 26, 2023
Merged

fix windows build error #204

merged 3 commits into from
Sep 26, 2023

Conversation

zuowanbushiwo
Copy link
Contributor

目前windows 编译有2个错误:

  1. SpeakerEngine::CosineSimilarity 这个函数中 使用std::inner_product 错误,windows 上没有引用正确的头文件,inner_product 正确的头文件是 #include <numeric>
  2. windows 上 onnxruntime 创建 Ort::Session 的参数错误,对应到如下代码:
    speaker_session_ = std::make_shared<Ort::Session>(env_, model_path.c_str(),
                                                      session_options_);

按照 https://github.com/wenet-e2e/wenet/blob/a7931ac212c4f28112874ca80cde3588ffedda4e/runtime/core/decoder/onnx_asr_model.cc#L86 这里修改 增加了 ToWString 转换函数

@cdliang11 cdliang11 changed the title fix two windows build error: 1. std::inner_product 2. onnxruntime api… fix windows build error Sep 26, 2023
@cdliang11
Copy link
Collaborator

please fix lint 👍

@JiJiJiang
Copy link
Collaborator

runtime/core/speaker/onnx_speaker_model.cc:46: Missing space after , [whitespace/comma] [3]
runtime/core/speaker/onnx_speaker_model.cc:49: Missing space after , [whitespace/comma] [3]

pls fix lint errors

@cdliang11 cdliang11 merged commit c9ec537 into wenet-e2e:master Sep 26, 2023
3 checks passed
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.

3 participants