mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-08 00:24:19 +00:00
small fixes
This commit is contained in:
parent
043aafce45
commit
f357d3ff3d
57
.github/scripts/run-pre-trained-conformer-ctc.sh
vendored
57
.github/scripts/run-pre-trained-conformer-ctc.sh
vendored
@ -10,16 +10,30 @@ log() {
|
|||||||
|
|
||||||
cd egs/librispeech/ASR
|
cd egs/librispeech/ASR
|
||||||
|
|
||||||
repo_url=https://github.com/csukuangfj/icefall-asr-conformer-ctc-bpe-500
|
# repo_url=https://github.com/csukuangfj/icefall-asr-conformer-ctc-bpe-500
|
||||||
git lfs install
|
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
log "Downloading pre-trained model from $repo_url"
|
||||||
git clone $repo_url
|
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
||||||
repo=$(basename $repo_url)
|
repo=$(basename $repo_url)
|
||||||
|
pushd $repo
|
||||||
|
|
||||||
|
git lfs pull --include "exp/pretrained.pt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/HLG.pt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/L.pt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/L_disambig.pt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/Linv.pt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/lexicon.txt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/lexicon_disambig.txt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/tokens.txt"
|
||||||
|
git lfs pull --include "data/lang_bpe_500/words.txt"
|
||||||
|
git lfs pull --include "data/lm/G_3_gram.fst.txt"
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
log "Display test files"
|
log "Display test files"
|
||||||
tree $repo/
|
tree $repo/
|
||||||
ls -lh $repo/test_wavs/*.flac
|
ls -lh $repo/test_wavs/*.wav
|
||||||
|
|
||||||
log "CTC decoding"
|
log "CTC decoding"
|
||||||
|
|
||||||
@ -28,9 +42,9 @@ log "CTC decoding"
|
|||||||
--num-classes 500 \
|
--num-classes 500 \
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
--checkpoint $repo/exp/pretrained.pt \
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
||||||
$repo/test_wavs/1089-134686-0001.flac \
|
$repo/test_wavs/1089-134686-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0001.flac \
|
$repo/test_wavs/1221-135766-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0002.flac
|
$repo/test_wavs/1221-135766-0002.wav
|
||||||
|
|
||||||
log "HLG decoding"
|
log "HLG decoding"
|
||||||
|
|
||||||
@ -41,9 +55,9 @@ log "HLG decoding"
|
|||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
--words-file $repo/data/lang_bpe_500/words.txt \
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
||||||
$repo/test_wavs/1089-134686-0001.flac \
|
$repo/test_wavs/1089-134686-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0001.flac \
|
$repo/test_wavs/1221-135766-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0002.flac
|
$repo/test_wavs/1221-135766-0002.wav
|
||||||
|
|
||||||
log "CTC decoding on CPU with kaldi decoders using OpenFst"
|
log "CTC decoding on CPU with kaldi decoders using OpenFst"
|
||||||
|
|
||||||
@ -65,7 +79,8 @@ ls -lh $repo/exp
|
|||||||
|
|
||||||
log "Generating H.fst, HL.fst"
|
log "Generating H.fst, HL.fst"
|
||||||
|
|
||||||
./local/prepare_lang_fst.py --lang-dir $repo/data/lang_bpe_500
|
./local/prepare_lang_fst.py --lang-dir $repo/data/lang_bpe_500 --ngram-G $repo/data/lm/G_3_gram.fst.txt
|
||||||
|
|
||||||
ls -lh $repo/data/lang_bpe_500
|
ls -lh $repo/data/lang_bpe_500
|
||||||
|
|
||||||
log "Decoding with H on CPU with OpenFst"
|
log "Decoding with H on CPU with OpenFst"
|
||||||
@ -74,9 +89,9 @@ log "Decoding with H on CPU with OpenFst"
|
|||||||
--nn-model $repo/exp/cpu_jit.pt \
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
--H $repo/data/lang_bpe_500/H.fst \
|
--H $repo/data/lang_bpe_500/H.fst \
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
||||||
$repo/test_wavs/1089-134686-0001.flac \
|
$repo/test_wavs/1089-134686-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0001.flac \
|
$repo/test_wavs/1221-135766-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0002.flac
|
$repo/test_wavs/1221-135766-0002.wav
|
||||||
|
|
||||||
log "Decoding with HL on CPU with OpenFst"
|
log "Decoding with HL on CPU with OpenFst"
|
||||||
|
|
||||||
@ -84,9 +99,9 @@ log "Decoding with HL on CPU with OpenFst"
|
|||||||
--nn-model $repo/exp/cpu_jit.pt \
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
--HL $repo/data/lang_bpe_500/HL.fst \
|
--HL $repo/data/lang_bpe_500/HL.fst \
|
||||||
--words $repo/data/lang_bpe_500/words.txt \
|
--words $repo/data/lang_bpe_500/words.txt \
|
||||||
$repo/test_wavs/1089-134686-0001.flac \
|
$repo/test_wavs/1089-134686-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0001.flac \
|
$repo/test_wavs/1221-135766-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0002.flac
|
$repo/test_wavs/1221-135766-0002.wav
|
||||||
|
|
||||||
log "Decoding with HLG on CPU with OpenFst"
|
log "Decoding with HLG on CPU with OpenFst"
|
||||||
|
|
||||||
@ -94,6 +109,6 @@ log "Decoding with HLG on CPU with OpenFst"
|
|||||||
--nn-model $repo/exp/cpu_jit.pt \
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.fst \
|
--HLG $repo/data/lang_bpe_500/HLG.fst \
|
||||||
--words $repo/data/lang_bpe_500/words.txt \
|
--words $repo/data/lang_bpe_500/words.txt \
|
||||||
$repo/test_wavs/1089-134686-0001.flac \
|
$repo/test_wavs/1089-134686-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0001.flac \
|
$repo/test_wavs/1221-135766-0001.wav \
|
||||||
$repo/test_wavs/1221-135766-0002.flac
|
$repo/test_wavs/1221-135766-0002.wav
|
||||||
|
Loading…
x
Reference in New Issue
Block a user