嘉渊
2023-05-17 e1ba6bc138b4e73875c64f35f98f3b15a0560e92
egs/aishell/paraformer/run.sh
@@ -3,7 +3,7 @@
. ./path.sh || exit 1;
# machines configuration
CUDA_VISIBLE_DEVICES="2,3"
CUDA_VISIBLE_DEVICES="0,1"
gpu_num=2
count=1
gpu_inference=true  # Whether to perform gpu decoding, set false for cpu decoding
@@ -20,8 +20,8 @@
type=sound
scp=wav.scp
speed_perturb="0.9 1.0 1.1"
stage=1
stop_stage=3
stage=0
stop_stage=5
# feature configuration
feats_dim=80
@@ -103,10 +103,16 @@
    echo "<unk>" >> ${token_list}
fi
# Training Stage
# ASR Training Stage
world_size=$gpu_num  # run on one machine
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
    echo "stage 3: Training"
    echo "stage 3: LM Training"
fi
# Training Stage
world_size=$gpu_num  # run on one machine
if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
    echo "stage 4: ASR Training"
    mkdir -p ${exp_dir}/exp/${model_dir}
    mkdir -p ${exp_dir}/exp/${model_dir}/log
    INIT_FILE=${exp_dir}/exp/${model_dir}/ddp_init
@@ -146,8 +152,8 @@
fi
# Testing Stage
if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
    echo "stage 4: Inference"
if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
    echo "stage 5: Inference"
    for dset in ${test_sets}; do
        asr_exp=${exp_dir}/exp/${model_dir}
        inference_tag="$(basename "${inference_config}" .yaml)"