From 9ab05cdaea04c8497a15990c9e1b69ed295316ac Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Fri, 17 Jan 2025 17:40:44 +0800 Subject: [PATCH] Update README.md for KWS to not use `git lfs`. --- wasm/kws/assets/README.md | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/wasm/kws/assets/README.md b/wasm/kws/assets/README.md index ac67fb5a04..18f792b49c 100644 --- a/wasm/kws/assets/README.md +++ b/wasm/kws/assets/README.md @@ -7,21 +7,34 @@ to download a model. # Kws The following is an example: -``` -cd sherpa-onnx/wasm/kws -git clone https://www.modelscope.cn/pkufool/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.git assets +```bash +cd sherpa-onnx/wasm/kws/assets +wget https://github.com/k2-fsa/sherpa-onnx/releases/download/kws-models/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2 +tar xvf sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2 +rm sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2 + +mv sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01/encoder-epoch-12-avg-2-chunk-16-left-64.onnx ./ +mv sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01/decoder-epoch-12-avg-2-chunk-16-left-64.onnx ./ +mv sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01/joiner-epoch-12-avg-2-chunk-16-left-64.onnx ./ +mv sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01/tokens.txt ./ +rm -rf sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01 ``` You should have the following files in `assets` before you can run `build-wasm-simd-kws.sh` -``` -├── decoder-epoch-12-avg-2-chunk-16-left-64.onnx -├── encoder-epoch-12-avg-2-chunk-16-left-64.onnx -├── joiner-epoch-12-avg-2-chunk-16-left-64.onnx -├── keywords_raw.txt -├── keywords.txt -├── README.md -└── tokens.txt +```bash +fangjuns-MacBook-Pro:assets fangjun$ pwd +/Users/fangjun/open-source/sherpa-onnx/wasm/kws/assets +fangjuns-MacBook-Pro:assets fangjun$ ls -lh +total 25616 +-rw-r--r-- 1 fangjun staff 692B Oct 29 16:53 README.md +-rw-r--r-- 1 fangjun staff 660K Aug 14 15:21 decoder-epoch-12-avg-2-chunk-16-left-64.onnx +-rw-r--r-- 1 fangjun staff 12M Aug 14 15:21 encoder-epoch-12-avg-2-chunk-16-left-64.onnx +-rw-r--r-- 1 fangjun staff 247K Aug 14 15:21 joiner-epoch-12-avg-2-chunk-16-left-64.onnx +-rw-r--r-- 1 fangjun staff 1.6K Aug 14 15:08 tokens.txt ``` + +**Hint**: Remember to remove extra files from ``assets``. For instance, please remember to remove +the file `sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2`.