Open binhtranmcs opened 7 months ago
Please only use https://github.com/k2-fsa/k2/blob/master/k2/torch/csrc/torch_api.h the above header file in your project.
All other header files and C++ source files should NOT be used in your project.
You can refer to https://github.com/k2-fsa/sherpa/blob/master/cmake/k2.cmake for an example about how to use k2 in another CMake-based project.
Please only use https://github.com/k2-fsa/k2/blob/master/k2/torch/csrc/torch_api.h the above header file in your project.
All other header files and C++ source files should NOT be used in your project.
tks a lot @csukuangfj, this fixes the problem.
@csukuangfj, k2/torch/csrc/torch_api.h
does not expose interfaces k2::SymbolTable
, k2::DecodeStateInfo
and k2::OnlineDenseIntersecter
. I can include k2/torch/csrc/symbol_table.h
for the k2::SymbolTable
, but the other 2 are not possible. I think k2/torch/csrc/torch_api.h
needs updating. Please have a further look.
As I said before, please only use k2/torch/csrc/torch_api.h
.
We have examples in k2-fsa/sherpa, please refer to it for examples.
Rembemer that using any other header files from k2 are not supported.
The core functions from k2 have already been added to k2/torch/csrc/torch_api.h
.
Thanks @csukuangfj, I understand that, but torch_api.h
does not expose interfaces for online decoding as well as nbest decoding. And I believe sherpa also does not have examples for those.
I am unsure whether @pkufool has time to add online decoding to torch_api.h
By the way, we support streaming HLG decoding in sherpa-onnx, though HLG decoding in sherpa-onnx runs only on CPU.
@binhtranmcs I will start this work after the May Day holiday.
Currently, I am trying to implement a custom k2 tritonserver backend, but i get this compilation error:
This is the
CmakeLists.txt
I use:The problem seems to be that I link the cpu-only version of k2. I wonder what is the proper way to link k2 with cuda to my C++ project using cmake. Please help me with this.
Thanks in advance!