|
|
@ -2,6 +2,7 @@
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
source path.sh
|
|
|
|
source path.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gpus=0,1,2,3,4,5,6,7
|
|
|
|
stage=0
|
|
|
|
stage=0
|
|
|
|
stop_stage=100
|
|
|
|
stop_stage=100
|
|
|
|
conf_path=conf/deepspeech2.yaml
|
|
|
|
conf_path=conf/deepspeech2.yaml
|
|
|
@ -21,7 +22,7 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
|
|
|
|
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
|
|
|
|
# train model, all `ckpt` under `exp` dir
|
|
|
|
# train model, all `ckpt` under `exp` dir
|
|
|
|
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 ./local/train.sh ${conf_path} ${ckpt} ${model_type}
|
|
|
|
CUDA_VISIBLE_DEVICES=${gpus} ./local/train.sh ${conf_path} ${ckpt} ${model_type}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
|
|
|
|
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
|
|
|
@ -31,7 +32,7 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
|
|
|
|
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
|
|
|
|
# test ckpt avg_n
|
|
|
|
# test ckpt avg_n
|
|
|
|
CUDA_VISIBLE_DEVICES=7 ./local/test.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} || exit -1
|
|
|
|
CUDA_VISIBLE_DEVICES=0 ./local/test.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} || exit -1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
|
|
|
|
if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then
|
|
|
@ -41,5 +42,5 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
|
|
|
|
if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
|
|
|
|
# test a single .wav file
|
|
|
|
# test a single .wav file
|
|
|
|
CUDA_VISIBLE_DEVICES=3 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1
|
|
|
|
CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|