diff --git a/README.md b/README.md index 1135eca2..dd21a0dd 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,38 @@ See This repo uses [onnxruntime](https://github.com/microsoft/onnxruntime) and does not depend on libtorch. + + +# Onnxruntime Installation +``` +git clone --recursive --branch v1.12.1 https://github.com/Microsoft/onnxruntime +cd onnxruntime +./build.sh \ + --config RelWithDebInfo \ + --build_shared_lib \ + --build_wheel \ + --skip_tests \ + --parallel 16 +cd build/Linux/RelWithDebInfo +sudo make install +export LD_LIBRARY_PATH=/path/to/onnxruntime/build/Linux/RelWithDebInfo:$LD_LIBRARY_PATH +``` + +# Usage +``` +git clone https://github.com/k2-fsa/sherpa-onnx +cd sherpa-onnx +mkdir build +cd build +cmake -DONNXRUNTIME_ROOTDIR=/path/to/onnxruntime \ + -DKALDI_NATIVE_IO_INSTALL_PREFIX=/path/to/kaldi_native_io .. +make +./bin/sherpa-onnx path/to/encoder.onnx \ + path/to/decoder.onnx \ + path/to/joiner.onnx \ + path/to/joiner_encoder_proj.onnx \ + path/to/joiner_decoder_proj.onnx \ + path/to/tokens.txt \ + greedy \ + path/to/audio.wav +``` diff --git a/cmake/kaldi-native-fbank.cmake b/cmake/kaldi-native-fbank.cmake index bb4a9074..53b7be4a 100644 --- a/cmake/kaldi-native-fbank.cmake +++ b/cmake/kaldi-native-fbank.cmake @@ -3,7 +3,7 @@ function(download_kaldi_native_fbank) # FetchContent is available since 3.11, # we've copied it to ${CMAKE_SOURCE_DIR}/cmake/Modules # so that it can be used in lower CMake versions. - message(STATUS "Use FetchContent provided by sherpa-ncnn") + message(STATUS "Use FetchContent provided by sherpa-onnx") list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) endif()