Support windows (#17)

* add onnxruntime for windows
This commit is contained in:
Fangjun Kuang
2022-10-13 17:30:30 +08:00
committed by GitHub
parent c70f5625f4
commit 4614d02d6d
7 changed files with 280 additions and 148 deletions

View File

@@ -20,25 +20,37 @@ the following links:
**HINT**: The script for exporting the Chinese model can be found at
<https://github.com/k2-fsa/icefall/blob/master/egs/wenetspeech/ASR/pruned_transducer_stateless2/export.py>
# Usage
## Build for Linux/macOS
```bash
git clone https://github.com/k2-fsa/sherpa-onnx
cd sherpa-onnx
mkdir build
cd build
cmake ..
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j6
cd ..
```
## Build for Windows
```bash
git clone https://github.com/k2-fsa/sherpa-onnx
cd sherpa-onnx
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cd ..
```
## Download the pretrained model (English)
**Caution**: You have to run `git lfs install`. Otherwise, you will be **SAD** later.
```bash
git lfs install
git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13
cd icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13
git lfs pull --include "exp/onnx/*.onnx"
cd ..
./build/bin/sherpa-onnx --help
@@ -54,11 +66,11 @@ git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-trans
## Download the pretrained model (Chinese)
**Caution**: You have to run `git lfs install`. Otherwise, you will be **SAD** later.
```bash
git lfs install
git clone https://huggingface.co/luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/luomingshuang/icefall_asr_wenetspeech_pruned_transducer_stateless2
cd icefall_asr_wenetspeech_pruned_transducer_stateless2
git lfs pull --include "exp/*.onnx"
cd ..
./build/bin/sherpa-onnx --help