mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Refactor CI tests for librispeech (#1436)
This commit is contained in:
parent
db52fe2349
commit
140e6381ad
73
.github/scripts/aishell/ASR/run.sh
vendored
73
.github/scripts/aishell/ASR/run.sh
vendored
@ -263,6 +263,76 @@ function test_transducer_stateless_modified_2_2022_03_01() {
|
|||||||
rm -rf $repo
|
rm -rf $repo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_conformer_ctc() {
|
||||||
|
repo_url=https://huggingface.co/csukuangfj/icefall_asr_aishell_conformer_ctc
|
||||||
|
log "Downloading pre-trained model from $repo_url"
|
||||||
|
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
||||||
|
repo=$(basename $repo_url)
|
||||||
|
pushd $repo
|
||||||
|
|
||||||
|
git lfs pull --include "exp/pretrained.pt"
|
||||||
|
git lfs pull --include "data/lang_char/H.fst"
|
||||||
|
git lfs pull --include "data/lang_char/HL.fst"
|
||||||
|
git lfs pull --include "data/lang_char/HLG.fst"
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
log "Display test files"
|
||||||
|
tree $repo/
|
||||||
|
ls -lh $repo/test_wavs/*.wav
|
||||||
|
|
||||||
|
log "CTC decoding"
|
||||||
|
|
||||||
|
log "Exporting model with torchscript"
|
||||||
|
|
||||||
|
pushd $repo/exp
|
||||||
|
ln -s pretrained.pt epoch-99.pt
|
||||||
|
popd
|
||||||
|
|
||||||
|
./conformer_ctc/export.py \
|
||||||
|
--epoch 99 \
|
||||||
|
--avg 1 \
|
||||||
|
--exp-dir $repo/exp \
|
||||||
|
--tokens $repo/data/lang_char/tokens.txt \
|
||||||
|
--jit 1
|
||||||
|
|
||||||
|
ls -lh $repo/exp
|
||||||
|
|
||||||
|
ls -lh $repo/data/lang_char
|
||||||
|
|
||||||
|
log "Decoding with H on CPU with OpenFst"
|
||||||
|
|
||||||
|
./conformer_ctc/jit_pretrained_decode_with_H.py \
|
||||||
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
|
--H $repo/data/lang_char/H.fst \
|
||||||
|
--tokens $repo/data/lang_char/tokens.txt \
|
||||||
|
$repo/test_wavs/0.wav \
|
||||||
|
$repo/test_wavs/1.wav \
|
||||||
|
$repo/test_wavs/2.wav
|
||||||
|
|
||||||
|
log "Decoding with HL on CPU with OpenFst"
|
||||||
|
|
||||||
|
./conformer_ctc/jit_pretrained_decode_with_HL.py \
|
||||||
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
|
--HL $repo/data/lang_char/HL.fst \
|
||||||
|
--words $repo/data/lang_char/words.txt \
|
||||||
|
$repo/test_wavs/0.wav \
|
||||||
|
$repo/test_wavs/1.wav \
|
||||||
|
$repo/test_wavs/2.wav
|
||||||
|
|
||||||
|
log "Decoding with HLG on CPU with OpenFst"
|
||||||
|
|
||||||
|
./conformer_ctc/jit_pretrained_decode_with_HLG.py \
|
||||||
|
--nn-model $repo/exp/cpu_jit.pt \
|
||||||
|
--HLG $repo/data/lang_char/HLG.fst \
|
||||||
|
--words $repo/data/lang_char/words.txt \
|
||||||
|
$repo/test_wavs/0.wav \
|
||||||
|
$repo/test_wavs/1.wav \
|
||||||
|
$repo/test_wavs/2.wav
|
||||||
|
|
||||||
|
rm -rf $repo
|
||||||
|
}
|
||||||
|
|
||||||
download_test_dev_manifests
|
download_test_dev_manifests
|
||||||
test_transducer_stateless3_2022_06_20
|
test_transducer_stateless3_2022_06_20
|
||||||
test_zipformer_large_2023_10_24
|
test_zipformer_large_2023_10_24
|
||||||
@ -270,5 +340,4 @@ test_zipformer_2023_10_24
|
|||||||
test_zipformer_small_2023_10_24
|
test_zipformer_small_2023_10_24
|
||||||
test_transducer_stateless_modified_2022_03_01
|
test_transducer_stateless_modified_2022_03_01
|
||||||
test_transducer_stateless_modified_2_2022_03_01
|
test_transducer_stateless_modified_2_2022_03_01
|
||||||
|
# test_conformer_ctc # fails for torch 1.13.x and torch 2.0.x
|
||||||
ls -lh
|
|
||||||
|
1624
.github/scripts/librispeech/ASR/run.sh
vendored
1624
.github/scripts/librispeech/ASR/run.sh
vendored
File diff suppressed because it is too large
Load Diff
@ -1,122 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-conformer-ctc3-2022-11-27
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
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/LG.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/lm/G_4_gram.pt"
|
|
||||||
git lfs pull --include "exp/jit_trace.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.trace()"
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./conformer_ctc3/jit_pretrained.py \
|
|
||||||
--model-filename $repo/exp/jit_trace.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
|
|
||||||
./conformer_ctc3/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--jit-trace 1 \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.trace()"
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./conformer_ctc3/jit_pretrained.py \
|
|
||||||
--model-filename $repo/exp/jit_trace.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./conformer_ctc3/pretrained.py \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p conformer_ctc3/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt conformer_ctc3/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh conformer_ctc3/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in ctc-decoding 1best; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
./conformer_ctc3/decode.py \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--exp-dir conformer_ctc3/exp/ \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--decoding-method $method \
|
|
||||||
--lm-dir data/lm
|
|
||||||
done
|
|
||||||
|
|
||||||
rm conformer_ctc3/exp/*.pt
|
|
||||||
fi
|
|
@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless-2022-03-12
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in fast_beam_search modified_beam_search beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless/exp/*.pt
|
|
||||||
fi
|
|
@ -1,86 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless2-2022-04-29
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
pushd $repo
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "exp/pretrained-epoch-38-avg-10.pt"
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained-epoch-38-avg-10.pt pretrained.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless2/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless2/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless2/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless2/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless2/exp/*.pt
|
|
||||||
rm -r data/lang_bpe_500
|
|
||||||
fi
|
|
@ -1,85 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-04-29
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
pushd $repo
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "exp/pretrained-epoch-25-avg-6.pt"
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained-epoch-25-avg-6.pt pretrained.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless3/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless3/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless3/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless3/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless3/exp/*.pt
|
|
||||||
rm -r data/lang_bpe_500
|
|
||||||
fi
|
|
@ -1,123 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless3-2022-05-13
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained-iter-1224000-avg-14.pt pretrained.pt
|
|
||||||
ln -s pretrained-iter-1224000-avg-14.pt epoch-99.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless3/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit-trace 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.trace()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--encoder-model-filename $repo/exp/encoder_jit_trace.pt \
|
|
||||||
--decoder-model-filename $repo/exp/decoder_jit_trace.pt \
|
|
||||||
--joiner-model-filename $repo/exp/joiner_jit_trace.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--encoder-model-filename $repo/exp/encoder_jit_script.pt \
|
|
||||||
--decoder-model-filename $repo/exp/decoder_jit_script.pt \
|
|
||||||
--joiner-model-filename $repo/exp/joiner_jit_script.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless3/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless3/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless3/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless3/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless3/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless3/exp/*.pt
|
|
||||||
fi
|
|
@ -1,100 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless5-2022-05-13
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained-epoch-39-avg-7.pt pretrained.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless5/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--num-encoder-layers 18 \
|
|
||||||
--dim-feedforward 2048 \
|
|
||||||
--nhead 8 \
|
|
||||||
--encoder-dim 512 \
|
|
||||||
--decoder-dim 512 \
|
|
||||||
--joiner-dim 512 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless5/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav \
|
|
||||||
--num-encoder-layers 18 \
|
|
||||||
--dim-feedforward 2048 \
|
|
||||||
--nhead 8 \
|
|
||||||
--encoder-dim 512 \
|
|
||||||
--decoder-dim 512 \
|
|
||||||
--joiner-dim 512
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless5/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained-epoch-39-avg-7.pt pruned_transducer_stateless5/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless5/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless5/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless5/exp \
|
|
||||||
--num-encoder-layers 18 \
|
|
||||||
--dim-feedforward 2048 \
|
|
||||||
--nhead 8 \
|
|
||||||
--encoder-dim 512 \
|
|
||||||
--decoder-dim 512 \
|
|
||||||
--joiner-dim 512
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless5/exp/*.pt
|
|
||||||
fi
|
|
@ -1,106 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless7/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless7/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless7/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless7/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless7/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless7/exp/*.pt
|
|
||||||
fi
|
|
@ -1,150 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-pruned-transducer-stateless7-ctc-2022-12-01
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
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/LG.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/lm/G_4_gram.pt"
|
|
||||||
git lfs pull --include "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless7_ctc/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc/jit_pretrained_ctc.py \
|
|
||||||
--model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc/pretrained_ctc.py \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless7_ctc/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless7_ctc/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless7_ctc/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless7_ctc/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc/ctc_decode.py \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--exp-dir ./pruned_transducer_stateless7_ctc/exp \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--decoding-method $m \
|
|
||||||
--hlg-scale 0.6 \
|
|
||||||
--lm-dir data/lm
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless7_ctc/exp/*.pt
|
|
||||||
fi
|
|
@ -1,147 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/yfyeung/icefall-asr-librispeech-pruned_transducer_stateless7_ctc_bs-2023-01-29
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/L.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/LG.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/HLG.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 "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/jit_pretrained_ctc.py \
|
|
||||||
--model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/pretrained_ctc.py \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--method $m \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless7_ctc_bs/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless7_ctc_bs/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless7_ctc_bs/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless7_ctc_bs/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
for m in ctc-decoding 1best; do
|
|
||||||
./pruned_transducer_stateless7_ctc_bs/ctc_decode.py \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--exp-dir ./pruned_transducer_stateless7_ctc_bs/exp \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--decoding-method $m \
|
|
||||||
--hlg-scale 0.6
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless7_ctc_bs/exp/*.pt
|
|
||||||
fi
|
|
@ -1,148 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-pruned-transducer-stateless7-streaming-2022-12-29
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
git lfs pull --include "exp/encoder_jit_trace.pt"
|
|
||||||
git lfs pull --include "exp/decoder_jit_trace.pt"
|
|
||||||
git lfs pull --include "exp/joiner_jit_trace.pt"
|
|
||||||
cd exp
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless7_streaming/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "Export to torchscript model by torch.jit.trace()"
|
|
||||||
./pruned_transducer_stateless7_streaming/jit_trace_export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.trace()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/jit_trace_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--encoder-model-filename $repo/exp/encoder_jit_trace.pt \
|
|
||||||
--decoder-model-filename $repo/exp/decoder_jit_trace.pt \
|
|
||||||
--joiner-model-filename $repo/exp/joiner_jit_trace.pt \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless7_streaming/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless7_streaming/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless7_streaming/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
num_decode_stream=200
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
--exp-dir pruned_transducer_stateless7_streaming/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless7_streaming/streaming_decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--decode-chunk-len 32 \
|
|
||||||
--num-decode-streams $num_decode_stream
|
|
||||||
--exp-dir pruned_transducer_stateless7_streaming/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless7_streaming/exp/*.pt
|
|
||||||
fi
|
|
@ -1,115 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless8-2022-11-14
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless8/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./pruned_transducer_stateless8/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless8/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless8/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless8/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless8/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt pruned_transducer_stateless8/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless8/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless8/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless8/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless8/exp/*.pt
|
|
||||||
fi
|
|
@ -1,101 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/pkufool/icefall_librispeech_streaming_pruned_transducer_stateless2_20220625
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained-epoch-24-avg-10.pt pretrained.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--simulate-streaming 1 \
|
|
||||||
--causal-convolution 1 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--simulate-streaming 1 \
|
|
||||||
--causal-convolution 1 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p pruned_transducer_stateless2/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained-epoch-24-avg-10.pt pruned_transducer_stateless2/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh pruned_transducer_stateless2/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Simulate streaming decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir pruned_transducer_stateless2/exp \
|
|
||||||
--simulate-streaming 1 \
|
|
||||||
--causal-convolution 1
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Real streaming decoding with $method"
|
|
||||||
|
|
||||||
./pruned_transducer_stateless2/streaming_decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--num-decode-streams 100 \
|
|
||||||
--exp-dir pruned_transducer_stateless2/exp \
|
|
||||||
--left-context 32 \
|
|
||||||
--decode-chunk-size 8 \
|
|
||||||
--right-context 0
|
|
||||||
done
|
|
||||||
|
|
||||||
rm pruned_transducer_stateless2/exp/*.pt
|
|
||||||
fi
|
|
@ -1,116 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-streaming-zipformer-2023-05-17
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/tokens.txt"
|
|
||||||
git lfs pull --include "exp/jit_script_chunk_16_left_128.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./zipformer/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--causal 1 \
|
|
||||||
--chunk-size 16 \
|
|
||||||
--left-context-frames 128 \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./zipformer/jit_pretrained_streaming.py \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--nn-model-filename $repo/exp/jit_script_chunk_16_left_128.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav
|
|
||||||
|
|
||||||
for method in greedy_search modified_beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./zipformer/pretrained.py \
|
|
||||||
--causal 1 \
|
|
||||||
--chunk-size 16 \
|
|
||||||
--left-context-frames 128 \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p zipformer/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt zipformer/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh zipformer/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Simulated streaming decoding with $method"
|
|
||||||
|
|
||||||
./zipformer/decode.py \
|
|
||||||
--causal 1 \
|
|
||||||
--chunk-size 16 \
|
|
||||||
--left-context-frames 128 \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir zipformer/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Chunk-wise streaming decoding with $method"
|
|
||||||
|
|
||||||
./zipformer/streaming_decode.py \
|
|
||||||
--causal 1 \
|
|
||||||
--chunk-size 16 \
|
|
||||||
--left-context-frames 128 \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir zipformer/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm zipformer/exp/*.pt
|
|
||||||
fi
|
|
@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-transducer-stateless2-torchaudio-2022-04-19
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./transducer_stateless2/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in fast_beam_search modified_beam_search beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./transducer_stateless2/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p transducer_stateless2/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt transducer_stateless2/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh transducer_stateless2/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./transducer_stateless2/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir transducer_stateless2/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm transducer_stateless2/exp/*.pt
|
|
||||||
fi
|
|
@ -1,94 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-zipformer-2023-05-15
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/tokens.txt"
|
|
||||||
git lfs pull --include "exp/jit_script.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./zipformer/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./zipformer/jit_pretrained.py \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--nn-model-filename $repo/exp/jit_script.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for method in greedy_search modified_beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./zipformer/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p zipformer/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt zipformer/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh zipformer/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./zipformer/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir zipformer/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm zipformer/exp/*.pt
|
|
||||||
fi
|
|
@ -1,117 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-zipformer-transducer-ctc-2023-06-13
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/bpe.model"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/tokens.txt"
|
|
||||||
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/LG.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/Linv.pt"
|
|
||||||
git lfs pull --include "data/lm/G_4_gram.pt"
|
|
||||||
git lfs pull --include "exp/jit_script.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./zipformer/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-transducer 1 \
|
|
||||||
--use-ctc 1 \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
for method in ctc-decoding 1best; do
|
|
||||||
./zipformer/jit_pretrained_ctc.py \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--model-filename $repo/exp/jit_script.pt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--method $method \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in ctc-decoding 1best; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./zipformer/pretrained_ctc.py \
|
|
||||||
--use-transducer 1 \
|
|
||||||
--use-ctc 1 \
|
|
||||||
--method $method \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
--G $repo/data/lm/G_4_gram.pt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--sample-rate 16000 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p zipformer/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt zipformer/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh zipformer/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in ctc-decoding 1best; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./zipformer/ctc_decode.py \
|
|
||||||
--use-transducer 1 \
|
|
||||||
--use-ctc 1 \
|
|
||||||
--decoding-method $method \
|
|
||||||
--nbest-scale 1.0 \
|
|
||||||
--hlg-scale 0.6 \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir zipformer/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm zipformer/exp/*.pt
|
|
||||||
fi
|
|
@ -1,102 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/Zengwei/icefall-asr-librispeech-zipformer-mmi-2022-12-08
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
git lfs pull --include "data/lang_bpe_500/3gram.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/4gram.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/L.pt"
|
|
||||||
git lfs pull --include "data/lang_bpe_500/LG.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 "exp/cpu_jit.pt"
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
ls -lh *.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Export to torchscript model"
|
|
||||||
./zipformer_mmi/export.py \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--use-averaged-model false \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp/*.pt
|
|
||||||
|
|
||||||
log "Decode with models exported by torch.jit.script()"
|
|
||||||
|
|
||||||
./zipformer_mmi/jit_pretrained.py \
|
|
||||||
--bpe-model $repo/data/lang_bpe_500/bpe.model \
|
|
||||||
--nn-model-filename $repo/exp/cpu_jit.pt \
|
|
||||||
--lang-dir $repo/data/lang_bpe_500 \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
for method in 1best nbest nbest-rescoring-LG nbest-rescoring-3-gram nbest-rescoring-4-gram; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./zipformer_mmi/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--lang-dir $repo/data/lang_bpe_500 \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p zipformer_mmi/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt zipformer_mmi/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh zipformer_mmi/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in 1best nbest nbest-rescoring-LG nbest-rescoring-3-gram nbest-rescoring-4-gram; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./zipformer_mmi/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--use-averaged-model 0 \
|
|
||||||
--nbest-scale 1.2 \
|
|
||||||
--hp-scale 1.0 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--lang-dir $repo/data/lang_bpe_500 \
|
|
||||||
--exp-dir zipformer_mmi/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm zipformer_mmi/exp/*.pt
|
|
||||||
fi
|
|
240
.github/scripts/run-pre-trained-ctc.sh
vendored
240
.github/scripts/run-pre-trained-ctc.sh
vendored
@ -1,240 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
pushd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/sherpa-onnx-zipformer-ctc-en-2023-10-02
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
log "CTC greedy search"
|
|
||||||
|
|
||||||
./zipformer/onnx_pretrained_ctc.py \
|
|
||||||
--nn-model $repo/model.onnx \
|
|
||||||
--tokens $repo/tokens.txt \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
log "CTC H decoding"
|
|
||||||
|
|
||||||
./zipformer/onnx_pretrained_ctc_H.py \
|
|
||||||
--nn-model $repo/model.onnx \
|
|
||||||
--tokens $repo/tokens.txt \
|
|
||||||
--H $repo/H.fst \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
log "CTC HL decoding"
|
|
||||||
|
|
||||||
./zipformer/onnx_pretrained_ctc_HL.py \
|
|
||||||
--nn-model $repo/model.onnx \
|
|
||||||
--words $repo/words.txt \
|
|
||||||
--HL $repo/HL.fst \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
log "CTC HLG decoding"
|
|
||||||
|
|
||||||
./zipformer/onnx_pretrained_ctc_HLG.py \
|
|
||||||
--nn-model $repo/model.onnx \
|
|
||||||
--words $repo/words.txt \
|
|
||||||
--HLG $repo/HLG.fst \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
rm -rf $repo
|
|
||||||
|
|
||||||
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"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $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"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
log "CTC decoding"
|
|
||||||
|
|
||||||
./conformer_ctc/pretrained.py \
|
|
||||||
--method ctc-decoding \
|
|
||||||
--num-classes 500 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "HLG decoding"
|
|
||||||
|
|
||||||
./conformer_ctc/pretrained.py \
|
|
||||||
--method 1best \
|
|
||||||
--num-classes 500 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--words-file $repo/data/lang_bpe_500/words.txt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.pt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "CTC decoding on CPU with kaldi decoders using OpenFst"
|
|
||||||
|
|
||||||
log "Exporting model with torchscript"
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
./conformer_ctc/export.py \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp
|
|
||||||
|
|
||||||
|
|
||||||
log "Generating H.fst, HL.fst"
|
|
||||||
|
|
||||||
./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
|
|
||||||
|
|
||||||
log "Decoding with H on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_H.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--H $repo/data/lang_bpe_500/H.fst \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "Decoding with HL on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_HL.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--HL $repo/data/lang_bpe_500/HL.fst \
|
|
||||||
--words $repo/data/lang_bpe_500/words.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
log "Decoding with HLG on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_HLG.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--HLG $repo/data/lang_bpe_500/HLG.fst \
|
|
||||||
--words $repo/data/lang_bpe_500/words.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
|
|
||||||
rm -rf $repo
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Test aishell"
|
|
||||||
|
|
||||||
pushd egs/aishell/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall_asr_aishell_conformer_ctc
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
pushd $repo
|
|
||||||
|
|
||||||
git lfs pull --include "exp/pretrained.pt"
|
|
||||||
git lfs pull --include "data/lang_char/H.fst"
|
|
||||||
git lfs pull --include "data/lang_char/HL.fst"
|
|
||||||
git lfs pull --include "data/lang_char/HLG.fst"
|
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
log "CTC decoding"
|
|
||||||
|
|
||||||
log "Exporting model with torchscript"
|
|
||||||
|
|
||||||
pushd $repo/exp
|
|
||||||
ln -s pretrained.pt epoch-99.pt
|
|
||||||
popd
|
|
||||||
|
|
||||||
./conformer_ctc/export.py \
|
|
||||||
--epoch 99 \
|
|
||||||
--avg 1 \
|
|
||||||
--exp-dir $repo/exp \
|
|
||||||
--tokens $repo/data/lang_char/tokens.txt \
|
|
||||||
--jit 1
|
|
||||||
|
|
||||||
ls -lh $repo/exp
|
|
||||||
|
|
||||||
ls -lh $repo/data/lang_char
|
|
||||||
|
|
||||||
log "Decoding with H on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_H.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--H $repo/data/lang_char/H.fst \
|
|
||||||
--tokens $repo/data/lang_char/tokens.txt \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
log "Decoding with HL on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_HL.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--HL $repo/data/lang_char/HL.fst \
|
|
||||||
--words $repo/data/lang_char/words.txt \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
log "Decoding with HLG on CPU with OpenFst"
|
|
||||||
|
|
||||||
./conformer_ctc/jit_pretrained_decode_with_HLG.py \
|
|
||||||
--nn-model $repo/exp/cpu_jit.pt \
|
|
||||||
--HLG $repo/data/lang_char/HLG.fst \
|
|
||||||
--words $repo/data/lang_char/words.txt \
|
|
||||||
$repo/test_wavs/0.wav \
|
|
||||||
$repo/test_wavs/1.wav \
|
|
||||||
$repo/test_wavs/2.wav
|
|
||||||
|
|
||||||
rm -rf $repo
|
|
@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-100h-transducer-stateless-multi-datasets-bpe-500-2022-02-21
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p transducer_stateless_multi_datasets/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt transducer_stateless_multi_datasets/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh transducer_stateless_multi_datasets/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir transducer_stateless_multi_datasets/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm transducer_stateless_multi_datasets/exp/*.pt
|
|
||||||
fi
|
|
@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-transducer-stateless-multi-datasets-bpe-500-2022-03-01
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in modified_beam_search beam_search fast_beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p transducer_stateless_multi_datasets/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt transducer_stateless_multi_datasets/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh transducer_stateless_multi_datasets/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./transducer_stateless_multi_datasets/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir transducer_stateless_multi_datasets/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm transducer_stateless_multi_datasets/exp/*.pt
|
|
||||||
fi
|
|
@ -1,77 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-transducer-stateless-bpe-500-2022-02-07
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
for sym in 1 2 3; do
|
|
||||||
log "Greedy search with --max-sym-per-frame $sym"
|
|
||||||
|
|
||||||
./transducer_stateless/pretrained.py \
|
|
||||||
--method greedy_search \
|
|
||||||
--max-sym-per-frame $sym \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
for method in fast_beam_search modified_beam_search beam_search; do
|
|
||||||
log "$method"
|
|
||||||
|
|
||||||
./transducer_stateless/pretrained.py \
|
|
||||||
--method $method \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
|
|
||||||
echo "GITHUB_EVENT_LABEL_NAME: ${GITHUB_EVENT_LABEL_NAME}"
|
|
||||||
if [[ x"${GITHUB_EVENT_NAME}" == x"schedule" || x"${GITHUB_EVENT_LABEL_NAME}" == x"run-decode" ]]; then
|
|
||||||
mkdir -p transducer_stateless/exp
|
|
||||||
ln -s $PWD/$repo/exp/pretrained.pt transducer_stateless/exp/epoch-999.pt
|
|
||||||
ln -s $PWD/$repo/data/lang_bpe_500 data/
|
|
||||||
|
|
||||||
ls -lh data
|
|
||||||
ls -lh transducer_stateless/exp
|
|
||||||
|
|
||||||
log "Decoding test-clean and test-other"
|
|
||||||
|
|
||||||
# use a small value for decoding with CPU
|
|
||||||
max_duration=100
|
|
||||||
|
|
||||||
for method in greedy_search fast_beam_search modified_beam_search; do
|
|
||||||
log "Decoding with $method"
|
|
||||||
|
|
||||||
./transducer_stateless/decode.py \
|
|
||||||
--decoding-method $method \
|
|
||||||
--epoch 999 \
|
|
||||||
--avg 1 \
|
|
||||||
--max-duration $max_duration \
|
|
||||||
--exp-dir transducer_stateless/exp
|
|
||||||
done
|
|
||||||
|
|
||||||
rm transducer_stateless/exp/*.pt
|
|
||||||
fi
|
|
33
.github/scripts/run-pre-trained-transducer.sh
vendored
33
.github/scripts/run-pre-trained-transducer.sh
vendored
@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
log() {
|
|
||||||
# This function is from espnet
|
|
||||||
local fname=${BASH_SOURCE[1]##*/}
|
|
||||||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
|
|
||||||
repo_url=https://huggingface.co/csukuangfj/icefall-asr-librispeech-transducer-bpe-500-2021-12-23
|
|
||||||
|
|
||||||
log "Downloading pre-trained model from $repo_url"
|
|
||||||
git lfs install
|
|
||||||
git clone $repo_url
|
|
||||||
repo=$(basename $repo_url)
|
|
||||||
|
|
||||||
log "Display test files"
|
|
||||||
tree $repo/
|
|
||||||
ls -lh $repo/test_wavs/*.wav
|
|
||||||
|
|
||||||
log "Beam search decoding"
|
|
||||||
|
|
||||||
./transducer/pretrained.py \
|
|
||||||
--method beam_search \
|
|
||||||
--beam-size 4 \
|
|
||||||
--checkpoint $repo/exp/pretrained.pt \
|
|
||||||
--tokens $repo/data/lang_bpe_500/tokens.txt \
|
|
||||||
$repo/test_wavs/1089-134686-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0001.wav \
|
|
||||||
$repo/test_wavs/1221-135766-0002.wav
|
|
11
.github/workflows/aishell.yml
vendored
11
.github/workflows/aishell.yml
vendored
@ -11,22 +11,13 @@ on:
|
|||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: aishell-${{ github.ref }}
|
group: aishell-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate_build_matrix:
|
generate_build_matrix:
|
||||||
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'aishell' || github.event_name == 'schedule')
|
if: (github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event.label.name == 'ready' || github.event_name == 'push' || github.event_name == 'aishell')
|
||||||
|
|
||||||
# see https://github.com/pytorch/pytorch/pull/50633
|
# see https://github.com/pytorch/pytorch/pull/50633
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
name: train librispeech
|
name: librispeech
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -11,7 +11,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: train-librispeech-${{ github.ref }}
|
group: librispeech-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -32,7 +32,7 @@ jobs:
|
|||||||
python ./.github/scripts/docker/generate_build_matrix.py
|
python ./.github/scripts/docker/generate_build_matrix.py
|
||||||
MATRIX=$(python ./.github/scripts/docker/generate_build_matrix.py)
|
MATRIX=$(python ./.github/scripts/docker/generate_build_matrix.py)
|
||||||
echo "::set-output name=matrix::${MATRIX}"
|
echo "::set-output name=matrix::${MATRIX}"
|
||||||
train-librispeech:
|
librispeech:
|
||||||
needs: generate_build_matrix
|
needs: generate_build_matrix
|
||||||
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }} v${{ matrix.version }}
|
name: py${{ matrix.python-version }} torch${{ matrix.torch-version }} v${{ matrix.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
159
.github/workflows/run-librispeech-2022-03-12.yml
vendored
159
.github/workflows/run-librispeech-2022-03-12.yml
vendored
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-03-12
|
|
||||||
# stateless transducer + k2 pruned rnnt-loss
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_03_12-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_03_12:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless-2022-03-12.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for pruned_transducer_stateless
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless
|
|
||||||
echo "results for pruned_transducer_stateless"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for pruned_transducer_stateless
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless-2022-03-12
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless/exp/
|
|
185
.github/workflows/run-librispeech-2022-04-29.yml
vendored
185
.github/workflows/run-librispeech-2022-04-29.yml
vendored
@ -1,185 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-04-29
|
|
||||||
# stateless pruned transducer (reworked model) + giga speech
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_04_29-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_04_29:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless2-2022-04-29.sh
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless3-2022-04-29.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for pruned_transducer_stateless2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
tree pruned_transducer_stateless2/exp
|
|
||||||
cd pruned_transducer_stateless2/exp
|
|
||||||
echo "===greedy search==="
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Display decoding results for pruned_transducer_stateless3
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
tree pruned_transducer_stateless3/exp
|
|
||||||
cd pruned_transducer_stateless3/exp
|
|
||||||
echo "===greedy search==="
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for pruned_transducer_stateless2
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless2-2022-04-29
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless2/exp/
|
|
||||||
|
|
||||||
- name: Upload decoding results for pruned_transducer_stateless3
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless3-2022-04-29
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless3/exp/
|
|
159
.github/workflows/run-librispeech-2022-05-13.yml
vendored
159
.github/workflows/run-librispeech-2022-05-13.yml
vendored
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-05-13
|
|
||||||
# stateless transducer + k2 pruned rnnt-loss + deeper model
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_05_13-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_05_13:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless5-2022-05-13.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless5
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless5/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless5
|
|
||||||
echo "results for pruned_transducer_stateless5"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless5
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless5-2022-05-13
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless5/exp/
|
|
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-11-11-stateless7
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_11_11_zipformer-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_11_11_zipformer:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless7-2022-11-11.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless7
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless7/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless7
|
|
||||||
echo "results for pruned_transducer_stateless7"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless7
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless7-2022-11-11
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless7/exp/
|
|
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-11-14-stateless8
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_11_14_zipformer_stateless8-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_11_14_zipformer_stateless8:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless8-2022-11-14.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless8
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless8/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless8
|
|
||||||
echo "results for pruned_transducer_stateless8"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless8
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless8-2022-11-14
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless8/exp/
|
|
@ -1,163 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-12-01-stateless7-ctc
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_11_11_zipformer:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless7-ctc-2022-12-01.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless7_ctc
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless7_ctc/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless7_ctc
|
|
||||||
echo "results for pruned_transducer_stateless7_ctc"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===ctc decoding==="
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===1best==="
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless7_ctc
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless7-ctc-2022-12-01
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless7_ctc/exp/
|
|
@ -1,167 +0,0 @@
|
|||||||
# Copyright 2022 Zengwei Yao
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-12-08-zipformer-mmi
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_12_08_zipformer-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_12_08_zipformer:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-zipformer-mmi-2022-12-08.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech zipformer-mmi
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./zipformer-mmi/exp
|
|
||||||
|
|
||||||
cd zipformer-mmi
|
|
||||||
echo "results for zipformer-mmi"
|
|
||||||
echo "===1best==="
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===nbest==="
|
|
||||||
find exp/nbest -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/nbest -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===nbest-rescoring-LG==="
|
|
||||||
find exp/nbest-rescoring-LG -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/nbest-rescoring-LG -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===nbest-rescoring-3-gram==="
|
|
||||||
find exp/nbest-rescoring-3-gram -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/nbest-rescoring-3-gram -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===nbest-rescoring-4-gram==="
|
|
||||||
find exp/nbest-rescoring-4-gram -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/nbest-rescoring-4-gram -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech zipformer-mmi
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-zipformer_mmi-2022-12-08
|
|
||||||
path: egs/librispeech/ASR/zipformer_mmi/exp/
|
|
@ -1,172 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-12-29-stateless7-streaming
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_12_29_zipformer_streaming-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_12_29_zipformer_streaming:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event.label.name == 'streaming-zipformer' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless7-streaming-2022-12-29.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless7_streaming
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless7_streaming/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless7_streaming
|
|
||||||
echo "results for pruned_transducer_stateless7_streaming"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===streaming greedy search==="
|
|
||||||
find exp/streaming/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===streaming fast_beam_search==="
|
|
||||||
find exp/streaming/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===streaming modified beam search==="
|
|
||||||
find exp/streaming/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless7_streaming
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless7-streaming-2022-12-29
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless7_streaming/exp/
|
|
@ -1,163 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2023-01-29-stateless7-ctc-bs
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2023_01_29_zipformer_ctc_bs:
|
|
||||||
if: github.event.label.name == 'run-decode' || github.event.label.name == 'blank-skip' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless7-ctc-bs-2023-01-29.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech pruned_transducer_stateless7_ctc_bs
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless7_ctc_bs/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless7_ctc_bs
|
|
||||||
echo "results for pruned_transducer_stateless7_ctc_bs"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===ctc decoding==="
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===1best==="
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech pruned_transducer_stateless7_ctc_bs
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless7-ctc-bs-2023-01-29
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless7_ctc_bs/exp/
|
|
@ -1,155 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-conformer-ctc3-2022-11-28
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_11_28_conformer_ctc3-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_11_28_conformer_ctc3:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-conformer-ctc3-2022-11-28.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech conformer_ctc3
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./conformer_ctc3/exp
|
|
||||||
|
|
||||||
cd conformer_ctc3
|
|
||||||
echo "results for conformer_ctc3"
|
|
||||||
echo "===ctc-decoding==="
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===1best==="
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech conformer_ctc3
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-conformer_ctc3-2022-11-28
|
|
||||||
path: egs/librispeech/ASR/conformer_ctc3/exp/
|
|
@ -1,157 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-pruned-transducer-stateless3-2022-05-13
|
|
||||||
# stateless pruned transducer (reworked model) + giga speech
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_pruned_transducer_stateless3_2022_05_13-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_pruned_transducer_stateless3_2022_05_13:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-pruned-transducer-stateless3-2022-05-13.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for pruned_transducer_stateless3
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR
|
|
||||||
tree pruned_transducer_stateless3/exp
|
|
||||||
cd pruned_transducer_stateless3/exp
|
|
||||||
echo "===greedy search==="
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for pruned_transducer_stateless3
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless3-2022-04-29
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless3/exp/
|
|
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-streaming-2022-06-26
|
|
||||||
# streaming conformer stateless transducer2
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_streaming_2022_06_26-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_streaming_2022_06_26:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-streaming-pruned-transducer-stateless2-2022-06-26.sh
|
|
||||||
|
|
||||||
- name: Display decoding results
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./pruned_transducer_stateless2/exp
|
|
||||||
|
|
||||||
cd pruned_transducer_stateless2
|
|
||||||
echo "results for pruned_transducer_stateless2"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified_beam_search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for pruned_transducer_stateless2
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-pruned_transducer_stateless2-2022-06-26
|
|
||||||
path: egs/librispeech/ASR/pruned_transducer_stateless2/exp/
|
|
@ -1,174 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-streaming-zipformer-2023-05-18
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2023_05_18_streaming_zipformer-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2023_05_18_streaming_zipformer:
|
|
||||||
if: github.event.label.name == 'zipformer' ||github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-streaming-zipformer-2023-05-18.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech zipformer
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./zipformer/exp
|
|
||||||
|
|
||||||
cd zipformer
|
|
||||||
|
|
||||||
echo "results for zipformer, simulated streaming decoding"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "results for zipformer, chunk-wise streaming decoding"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/streaming/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/streaming/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/streaming/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/streaming/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech zipformer
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-zipformer-2022-11-11
|
|
||||||
path: egs/librispeech/ASR/zipformer/exp/
|
|
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-2022-04-19
|
|
||||||
# stateless transducer + torchaudio rnn-t loss
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2022_04_19-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2022_04_19:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-transducer-stateless2-2022-04-19.sh
|
|
||||||
|
|
||||||
- name: Display decoding results
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./transducer_stateless2/exp
|
|
||||||
|
|
||||||
cd transducer_stateless2
|
|
||||||
echo "results for transducer_stateless2"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified_beam_search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for transducer_stateless2
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-transducer_stateless2-2022-04-19
|
|
||||||
path: egs/librispeech/ASR/transducer_stateless2/exp/
|
|
@ -1,159 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-zipformer-2023-05-18
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2023_05_18_zipformer-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2023_05_18_zipformer:
|
|
||||||
if: github.event.label.name == 'zipformer' ||github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-zipformer-2023-05-18.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech zipformer
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./zipformer/exp
|
|
||||||
|
|
||||||
cd zipformer
|
|
||||||
echo "results for zipformer"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech zipformer
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-zipformer-2022-11-11
|
|
||||||
path: egs/librispeech/ASR/zipformer/exp/
|
|
@ -1,155 +0,0 @@
|
|||||||
# Copyright 2022 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-librispeech-zipformer-ctc-2023-06-14
|
|
||||||
# zipformer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_librispeech_2023_06_14_zipformer-ctc-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_librispeech_2023_06_14_zipformer_ctc:
|
|
||||||
if: github.event.label.name == 'zipformer' ||github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-librispeech-zipformer-ctc-2023-06-14.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for librispeech zipformer
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./zipformer/exp
|
|
||||||
|
|
||||||
cd zipformer
|
|
||||||
echo "results for zipformer"
|
|
||||||
echo "===ctc-decoding==="
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/ctc-decoding -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===1best==="
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/1best -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for librispeech zipformer
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-zipformer-2022-11-11
|
|
||||||
path: egs/librispeech/ASR/zipformer/exp/
|
|
87
.github/workflows/run-pretrained-ctc.yml
vendored
87
.github/workflows/run-pretrained-ctc.yml
vendored
@ -1,87 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-pre-trained-ctc
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
test-run:
|
|
||||||
description: 'Test (y/n)?'
|
|
||||||
required: true
|
|
||||||
default: 'y'
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_pre_trained_ctc-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_pre_trained_ctc:
|
|
||||||
if: github.event.label.name == 'ready' || github.event_name == 'push' || github.event.inputs.test-run == 'y' || github.event.label.name == 'ctc'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
.github/scripts/run-pre-trained-ctc.sh
|
|
@ -1,158 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-pre-trained-trandsucer-stateless-multi-datasets-librispeech-100h
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_pre_trained_transducer_stateless_multi_datasets_librispeech_100h-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_pre_trained_transducer_stateless_multi_datasets_librispeech_100h:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-pre-trained-transducer-stateless-librispeech-100h.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for transducer_stateless_multi_datasets
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./transducer_stateless_multi_datasets/exp
|
|
||||||
|
|
||||||
cd transducer_stateless_multi_datasets
|
|
||||||
echo "results for transducer_stateless_multi_datasets"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for transducer_stateless_multi_datasets
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-transducer_stateless_multi_datasets-100h-2022-02-21
|
|
||||||
path: egs/librispeech/ASR/transducer_stateless_multi_datasets/exp/
|
|
@ -1,158 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-pre-trained-trandsucer-stateless-multi-datasets-librispeech-960h
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_pre_trained_transducer_stateless_multi_datasets_librispeech_960h-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_pre_trained_transducer_stateless_multi_datasets_librispeech_960h:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-pre-trained-transducer-stateless-librispeech-960h.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for transducer_stateless_multi_datasets
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./transducer_stateless_multi_datasets/exp
|
|
||||||
|
|
||||||
cd transducer_stateless_multi_datasets
|
|
||||||
echo "results for transducer_stateless_multi_datasets"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for transducer_stateless_multi_datasets
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-transducer_stateless_multi_datasets-100h-2022-03-01
|
|
||||||
path: egs/librispeech/ASR/transducer_stateless_multi_datasets/exp/
|
|
@ -1,158 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-pre-trained-transducer-stateless
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
schedule:
|
|
||||||
# minute (0-59)
|
|
||||||
# hour (0-23)
|
|
||||||
# day of the month (1-31)
|
|
||||||
# month (1-12)
|
|
||||||
# day of the week (0-6)
|
|
||||||
# nightly build at 15:50 UTC time every day
|
|
||||||
- cron: "50 15 * * *"
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_pre_trained_transducer_stateless-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_pre_trained_transducer_stateless:
|
|
||||||
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/install-kaldifeat.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other datasets
|
|
||||||
id: libri-test-clean-and-test-other-data
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/download
|
|
||||||
key: cache-libri-test-clean-and-test-other
|
|
||||||
|
|
||||||
- name: Download LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-data.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/download-librispeech-test-clean-and-test-other-dataset.sh
|
|
||||||
|
|
||||||
- name: Prepare manifests for LibriSpeech test-clean and test-other
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/prepare-librispeech-test-clean-and-test-other-manifests.sh
|
|
||||||
|
|
||||||
- name: Cache LibriSpeech test-clean and test-other fbank features
|
|
||||||
id: libri-test-clean-and-test-other-fbank
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/fbank-libri
|
|
||||||
key: cache-libri-fbank-test-clean-and-test-other-v2
|
|
||||||
|
|
||||||
- name: Compute fbank for LibriSpeech test-clean and test-other
|
|
||||||
if: steps.libri-test-clean-and-test-other-fbank.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
.github/scripts/compute-fbank-librispeech-test-clean-and-test-other.sh
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
||||||
GITHUB_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
||||||
run: |
|
|
||||||
mkdir -p egs/librispeech/ASR/data
|
|
||||||
ln -sfv ~/tmp/fbank-libri egs/librispeech/ASR/data/fbank
|
|
||||||
ls -lh egs/librispeech/ASR/data/*
|
|
||||||
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
|
|
||||||
.github/scripts/run-pre-trained-transducer-stateless.sh
|
|
||||||
|
|
||||||
- name: Display decoding results for transducer_stateless
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd egs/librispeech/ASR/
|
|
||||||
tree ./transducer_stateless/exp
|
|
||||||
|
|
||||||
cd transducer_stateless
|
|
||||||
echo "results for transducer_stateless"
|
|
||||||
echo "===greedy search==="
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/greedy_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===fast_beam_search==="
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/fast_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
echo "===modified beam search==="
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-clean" {} + | sort -n -k2
|
|
||||||
find exp/modified_beam_search -name "log-*" -exec grep -n --color "best for test-other" {} + | sort -n -k2
|
|
||||||
|
|
||||||
- name: Upload decoding results for transducer_stateless
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
if: github.event_name == 'schedule' || github.event.label.name == 'run-decode'
|
|
||||||
with:
|
|
||||||
name: torch-${{ matrix.torch }}-python-${{ matrix.python-version }}-ubuntu-latest-cpu-transducer_stateless-2022-02-07
|
|
||||||
path: egs/librispeech/ASR/transducer_stateless/exp/
|
|
80
.github/workflows/run-pretrained-transducer.yml
vendored
80
.github/workflows/run-pretrained-transducer.yml
vendored
@ -1,80 +0,0 @@
|
|||||||
# Copyright 2021 Fangjun Kuang (csukuangfj@gmail.com)
|
|
||||||
|
|
||||||
# See ../../LICENSE for clarification regarding multiple authors
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
name: run-pre-trained-transducer
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: run_pre_trained_transducer-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run_pre_trained_transducer:
|
|
||||||
if: github.event.label.name == 'ready' || github.event_name == 'push'
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
python-version: [3.8]
|
|
||||||
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
cache: 'pip'
|
|
||||||
cache-dependency-path: '**/requirements-ci.txt'
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install
|
|
||||||
pip uninstall -y protobuf
|
|
||||||
pip install --no-binary protobuf protobuf==3.20.*
|
|
||||||
|
|
||||||
- name: Cache kaldifeat
|
|
||||||
id: my-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/tmp/kaldifeat
|
|
||||||
key: cache-tmp-${{ matrix.python-version }}-2023-05-22
|
|
||||||
|
|
||||||
- name: Install kaldifeat
|
|
||||||
if: steps.my-cache.outputs.cache-hit != 'true'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
make -j2 _kaldifeat
|
|
||||||
|
|
||||||
- name: Inference with pre-trained model
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
sudo apt-get -qq install git-lfs tree
|
|
||||||
export PYTHONPATH=$PWD:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/kaldifeat/python:$PYTHONPATH
|
|
||||||
export PYTHONPATH=~/tmp/kaldifeat/build/lib:$PYTHONPATH
|
|
||||||
.github/scripts/run-pre-trained-transducer.sh
|
|
Loading…
x
Reference in New Issue
Block a user