Fangjun Kuang
Committed by GitHub

Update README (#13)

正在显示 1 个修改的文件 包含 31 行增加26 行删除
@@ -5,37 +5,42 @@ See <https://github.com/k2-fsa/sherpa> @@ -5,37 +5,42 @@ See <https://github.com/k2-fsa/sherpa>
5 This repo uses [onnxruntime](https://github.com/microsoft/onnxruntime) and 5 This repo uses [onnxruntime](https://github.com/microsoft/onnxruntime) and
6 does not depend on libtorch. 6 does not depend on libtorch.
7 7
  8 +We provide exported models in onnx format and they can be downloaded using
  9 +the following links:
  10 +
  11 +- English: <https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13>
  12 +- Chinese: `TODO`
  13 +
  14 +**NOTE**: We provide only non-streaming models at present.
8 15
9 -# Onnxruntime Installation  
10 -```  
11 -git clone --recursive --branch v1.12.1 https://github.com/Microsoft/onnxruntime  
12 -cd onnxruntime  
13 -./build.sh \  
14 - --config RelWithDebInfo \  
15 - --build_shared_lib \  
16 - --build_wheel \  
17 - --skip_tests \  
18 - --parallel 16  
19 -cd build/Linux/RelWithDebInfo  
20 -sudo make install  
21 -export LD_LIBRARY_PATH=/path/to/onnxruntime/build/Linux/RelWithDebInfo:$LD_LIBRARY_PATH  
22 -```  
23 16
24 # Usage 17 # Usage
25 -``` 18 +
  19 +```bash
26 git clone https://github.com/k2-fsa/sherpa-onnx 20 git clone https://github.com/k2-fsa/sherpa-onnx
27 cd sherpa-onnx 21 cd sherpa-onnx
28 mkdir build 22 mkdir build
29 cd build 23 cd build
30 -cmake -DONNXRUNTIME_ROOTDIR=/path/to/onnxruntime \  
31 - -DKALDI_NATIVE_IO_INSTALL_PREFIX=/path/to/kaldi_native_io ..  
32 -make  
33 -./bin/sherpa-onnx path/to/encoder.onnx \  
34 - path/to/decoder.onnx \  
35 - path/to/joiner.onnx \  
36 - path/to/joiner_encoder_proj.onnx \  
37 - path/to/joiner_decoder_proj.onnx \  
38 - path/to/tokens.txt \  
39 - greedy \  
40 - path/to/audio.wav 24 +cmake ..
  25 +make -j6
  26 +cd ..
  27 +```
  28 +
  29 +## Download the pretrained model (English)
  30 +
  31 +**Caution**: You have to run `git lfs install`. Otherwise, you will be **SAD** later.
  32 +
  33 +```bash
  34 +git lfs install
  35 +git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13
  36 +
  37 +./build/bin/sherpa-onnx \
  38 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/exp/onnx/encoder.onnx \
  39 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/exp/onnx/decoder.onnx \
  40 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/exp/onnx/joiner.onnx \
  41 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/exp/onnx/joiner_encoder_proj.onnx \
  42 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/exp/onnx/joiner_decoder_proj.onnx \
  43 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/data/lang_bpe_500/tokens.txt \
  44 + greedy \
  45 + ./icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13/test_wavs/1089-134686-0001.wav
41 ``` 46 ```