k2-fsa / sherpa-onnx

Speech-to-text, text-to-speech, speaker recognition, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, Flutter, Object Pascal, Lazarus, Rust
https://k2-fsa.github.io/sherpa/onnx/index.html
Apache License 2.0
3.34k stars 391 forks source link

请问有计划支持Windows On Arm平台吗? #910

Closed zhanweiw closed 4 months ago

zhanweiw commented 4 months ago

刚才下载了想在Windows On ARM平台上编译,遇到CMake配置时报错:

-- CMAKE_SYSTEM_NAME: Windows
-- CMAKE_SYSTEM_PROCESSOR: ARM64
-- location_onnxruntime_header_dir: location_onnxruntime_header_dir-NOTFOUND
-- location_onnxruntime_lib: location_onnxruntime_lib-NOTFOUND
-- Could not find a pre-installed onnxruntime.
-- Downloading pre-compiled onnxruntime
-- CMAKE_SYSTEM_NAME: Windows
-- CMAKE_SYSTEM_PROCESSOR: ARM64
-- CMAKE_VS_PLATFORM_NAME: ARM64
-- Use static onnxruntime libraries
-- CMAKE_SYSTEM_NAME: Windows
-- CMAKE_SYSTEM_PROCESSOR: ARM64
-- CMAKE_VS_PLATFORM_NAME: ARM64
CMake Error at cmake/onnxruntime-win-x64-static.cmake:11 (message):
  This file is for Windows x64 only.  Given: ARM64
Call Stack (most recent call first):
  cmake/onnxruntime.cmake:104 (include)
  cmake/onnxruntime.cmake:205 (download_onnxruntime)
  CMakeLists.txt:239 (include)

-- Configuring incomplete, errors occurred!
csukuangfj commented 4 months ago

稍等,我加一个,你帮忙测试下?

zhanweiw commented 4 months ago

好的。非常感谢!

csukuangfj commented 4 months ago

请用 https://github.com/k2-fsa/sherpa-onnx/pull/911

我们本地没有 windows arm64 的环境,无法进行测试。

请帮忙测试下,多谢!

zhanweiw commented 4 months ago

好的。我来试一下,有结果会反馈给你。谢谢!

zhanweiw commented 4 months ago

用如下命令可以成功编译并且可以运行,我测试了sherpa-onnx-offline + sherpa-onnx-paraformer-zh-2024-03-09:

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .. 
cmake --build . --config Release
csukuangfj commented 4 months ago

多谢测试!