From ff1cc19156ecbe1b4be3c464d0d822699031d140 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Tue, 3 Jul 2018 20:59:18 -0700 Subject: [PATCH] Upload auxilary files for decoding --- fluid/DeepASR/examples/aishell/infer_by_ckpt.sh | 12 ++++++------ fluid/DeepASR/examples/aishell/prepare_data.sh | 6 ++++++ fluid/DeepASR/examples/aishell/score_cer.sh | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/fluid/DeepASR/examples/aishell/infer_by_ckpt.sh b/fluid/DeepASR/examples/aishell/infer_by_ckpt.sh index 60a48ba5..2d317574 100644 --- a/fluid/DeepASR/examples/aishell/infer_by_ckpt.sh +++ b/fluid/DeepASR/examples/aishell/infer_by_ckpt.sh @@ -1,8 +1,8 @@ decode_to_path=./decoding_result.txt -export CUDA_VISIBLE_DEVICES=2,3,4,5 +export CUDA_VISIBLE_DEVICES=0,1,2,3 python -u ../../infer_by_ckpt.py --batch_size 96 \ - --checkpoint checkpoints/deep_asr.pass_20.checkpoint \ + --checkpoint checkpoints/deep_asr.latest.checkpoint \ --infer_feature_lst data/test_feature.lst \ --mean_var data/global_mean_var \ --frame_dim 80 \ @@ -10,9 +10,9 @@ python -u ../../infer_by_ckpt.py --batch_size 96 \ --num_threads 24 \ --beam_size 11 \ --decode_to_path $decode_to_path \ - --trans_model mapped_decoder_data/exp/tri5a/final.mdl \ - --log_prior mapped_decoder_data/logprior \ - --vocabulary mapped_decoder_data/exp/tri5a/graph/words.txt \ - --graphs mapped_decoder_data/exp/tri5a/graph/HCLG.fst \ + --trans_model aux/final.mdl \ + --log_prior aux/logprior \ + --vocabulary aux/graph/words.txt \ + --graphs aux/graph/HCLG.fst \ --acoustic_scale 0.059 \ --parallel diff --git a/fluid/DeepASR/examples/aishell/prepare_data.sh b/fluid/DeepASR/examples/aishell/prepare_data.sh index 3b4a8753..8bb7ac5c 100644 --- a/fluid/DeepASR/examples/aishell/prepare_data.sh +++ b/fluid/DeepASR/examples/aishell/prepare_data.sh @@ -1,7 +1,9 @@ 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' +aux_url='http://deep-asr-data.gz.bcebos.com/aux.tar.gz' md5=17669b8d63331c9326f4a9393d289bfb +aux_md5=50e3125eba1e3a2768a6f2e499cc1749 if [ ! -e $data_dir ]; then mkdir -p $data_dir @@ -35,3 +37,7 @@ wget -c -P data $lst_url tar xvf data/aishell_lst.tar.gz -C data ln -s $data_dir data/aishell + +echo "Download and untar aux files ..." +wget -c $aux_url +tar xvf aux.tar.gz diff --git a/fluid/DeepASR/examples/aishell/score_cer.sh b/fluid/DeepASR/examples/aishell/score_cer.sh index 6c60d196..70dfcbad 100644 --- a/fluid/DeepASR/examples/aishell/score_cer.sh +++ b/fluid/DeepASR/examples/aishell/score_cer.sh @@ -1,4 +1,4 @@ -ref_txt=data/text.test +ref_txt=aux/test.ref.txt hyp_txt=decoding_result.txt python ../../score_error_rate.py --error_rate_type cer --ref $ref_txt --hyp $hyp_txt -- GitLab