k2-fsa / sherpa-ncnn

Real-time speech recognition using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Raspberry Pi, VisionFive2, LicheePi4A etc.
https://k2-fsa.github.io/sherpa/ncnn/index.html
Apache License 2.0
902 stars 138 forks source link

[Help needed] Support using pre-compiled ncnn library #258

Open csukuangfj opened 10 months ago

csukuangfj commented 10 months ago

Currently, we use a fork of ncnn https://github.com/k2-fsa/sherpa-ncnn/blob/fc4d3bc2d9593d62046431195e3960effe244831/cmake/ncnn.cmake#L9

But actually, sherpa-ncnn supports using the master of https://github.com/tencent/ncnn/

We need to change https://github.com/k2-fsa/sherpa-ncnn/blob/fc4d3bc2d9593d62046431195e3960effe244831/CMakeLists.txt#L140 to something like below

find_package(ncnn)

if(NOT ncnn_FOUND)
  include(ncnn)
endif()

We also need to add tests to cover the above change.


Please see https://github.com/Tencent/ncnn/wiki/use-ncnn-with-own-project for further information.