wenet-e2e / wespeaker

Research and Production Oriented Speaker Verification, Recognition and Diarization Toolkit
Apache License 2.0
664 stars 112 forks source link

fix windows build error #204

Closed zuowanbushiwo closed 11 months ago

zuowanbushiwo commented 11 months ago

目前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 commented 11 months ago

please fix lint 👍

JiJiJiang commented 11 months ago

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