chenkui164 / FastASR

这是一个用C++实现ASR推理的项目,它依赖很少,安装也很简单,推理速度很快,在树莓派4B等ARM平台也可以流畅的运行。 支持的模型是由Google的Transformer模型中优化而来,数据集是开源wenetspeech(10000+小时)或阿里私有数据集(60000+小时), 所以识别效果也很好,可以媲美许多商用的ASR软件。
Apache License 2.0
482 stars 74 forks source link

build with some error #56

Open Yayi opened 1 year ago

Yayi commented 1 year ago

I have installed openblas, but there are some errors: /usr/bin/ld: ../src/lib/libfastasr.a(Predictor.cpp.o): in functionparaformer::Predictor::cif_conv1d(Tensor&)': Predictor.cpp:(.text+0x222): undefined reference to cblas_sgemm' /usr/bin/ld: ../src/lib/libfastasr.a(Predictor.cpp.o): in functionparaformer::Predictor::forward(Tensor&)': Predictor.cpp:(.text+0x48a): undefined reference to cblas_sgemm' /usr/bin/ld: ../src/lib/libfastasr.a(CTCDecode.cpp.o): in functionCTCdecode::forward(Tensor)': CTCDecode.cpp:(.text+0x3e93): undefined reference to cblas_sgemm' /usr/bin/ld: ../src/lib/libfastasr.a(Decoder.cpp.o): in functionpaddlespeech::Decoder::forward(Tensor, Tensor, Tensor, Tensor, Tensor&)': Decoder.cpp:(.text+0x434): undefined reference to cblas_sgemm' /usr/bin/ld: Decoder.cpp:(.text+0x58f): undefined reference tocblas_sgemm' /usr/bin/ld: ../src/lib/libfastasr.a(Joiner.cpp.o):Joiner.cpp:(.text+0x117): more undefined references to cblas_sgemm' follow collect2: error:ld return 1 make[2]: *** [examples/CMakeFiles/paddlespeech_cli.dir/build.make:98:examples/paddlespeech_cli] error 1 make[1]: *** [CMakeFiles/Makefile2:208:examples/CMakeFiles/paddlespeech_cli.dir/all] error 2 make: *** [Makefile:91:all] error 2

at the archlinux , cblas and openblas cannot be installed together. do you have any ideas?tnx.

chenkui164 commented 1 year ago
  1. Find where libopenblas.a is located on your computer:
    sudo find / -name 'libopenblas.a'
  2. Add the path of libopenblas to CMakeLists.txt
    target_link_directories(${PROJECT_NAME} PUBLIC "/usr/local/opt/openblas/lib")