k2-fsa / sherpa-ncnn

Real-time speech recognition and voice activity detection (VAD) using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Linux, macOS, Windows, Raspberry Pi, VisionFive2, LicheePi4A etc.
https://k2-fsa.github.io/sherpa/ncnn/index.html
Apache License 2.0
996 stars 154 forks source link

关于sherpa-onnx的比较 #316

Closed shenck0 closed 7 months ago

shenck0 commented 7 months ago

从模型转换难易度看,用onnx更方便,那么sherpa-ncnn的优势在于?是否是速度更快 例如,在armv8的设备上,sherpa-ncnn和sherpa-onnx在相同的tts或asr模型上,是否某一个有明显速度优势呢?

csukuangfj commented 7 months ago

你可以从以下几方面去比较

  1. 库文件大小
  2. 模型文件大小
  3. 对量化的支持程度
  4. 增加新的 operator 的容易程度,即扩展 ncnn 和 onnxruntime 的容易程度
  5. 支持的 cpu 种类
  6. 碰到问题时,寻求帮助的容易程度,(指 ncnn 和 onnxruntime)

还有,为什么只关注速度呢?速度和测试的环境有关系。你们直接测试下就知道了。

shenck0 commented 7 months ago

你说的很全面,感谢指教! 从使用者角度,为什么更关注速度呢,因为现在模型普遍都很大,显得对库和权重文件大小不是很重要;扩展难度上因为预计不太会新增不支持的算子,主流算子已经很充分了(除非实现一些算子fusion);从cpu种类看,两者支持范围都很广了,很大比例用户都可以选择两者之一;对量化支持程度,也回到速度问题