diff --git a/fluid/DeepASR/examples/aishell/prepare_data.sh b/fluid/DeepASR/examples/aishell/prepare_data.sh new file mode 100644 index 0000000000000000000000000000000000000000..d2c051c4d9ea10547f5ba4cc20213f430bf6dfce --- /dev/null +++ b/fluid/DeepASR/examples/aishell/prepare_data.sh @@ -0,0 +1,37 @@ +data_dir=~/.cache/paddle/dataset/speech/deep_asr_data/aishell +data_url='http://deep-asr-data.gz.bcebos.com/aishell_data.tar.gz' +lst_url='http://deep-asr-data.gz.bcebos.com/aishell_lst.tar.gz' +md5=e017d858d9e509c8a84b73f673f08b9a + +if [ ! -e $data_dir ]; then + mkdir -p $data_dir +fi + +if [ ! -e $data_dir/aishell_data.tar.gz ]; then + echo "Download $data_dir/aishell_data.tar.gz ..." + wget -c -P $data_dir $data_url +else + echo "Skip downloading for $data_dir/aishell_data.tar.gz has already existed!" +fi + +echo "Checking md5 sum ..." +md5sum_tmp=`md5sum $data_dir/aishell_data.tar.gz | cut -d ' ' -f1` + +if [ $md5sum_tmp != $md5 ]; then + echo "Md5sum check failed, please remove and redownload " + "$data_dir/aishell_data.tar.gz" + exit 1 +fi + +echo "Untar aishell_data.tar.gz ..." +tar xzf $data_dir/aishell_data.tar.gz -C $data_dir + +if [ ! -e data ]; then + mkdir data +fi + +echo "Download and untar lst files ..." +wget -c -P data $lst_url +tar xvf data/aishell_lst.tar.gz -C data + +ln -s $data_dir data/aishell diff --git a/fluid/DeepASR/examples/aishell/train.sh b/fluid/DeepASR/examples/aishell/train.sh new file mode 100644 index 0000000000000000000000000000000000000000..41c0df2cd4985ae555f70554f27ff0dde8cb0cbe --- /dev/null +++ b/fluid/DeepASR/examples/aishell/train.sh @@ -0,0 +1,13 @@ +export CUDA_VISIBLE_DEVICES=2,3,4,5 +python -u ../../train.py --train_feature_lst data/train_feature.lst \ + --train_label_lst data/train_label.lst \ + --val_feature_lst data/val_feature.lst \ + --val_label_lst data/val_label.lst \ + --mean_var data/aishell/global_mean_var \ + --checkpoints checkpoints \ + --frame_dim 2640 \ + --class_num 101 \ + --infer_models '' \ + --batch_size 128 \ + --learning_rate 0.00016 \ + --parallel