From 325d28d1e8de14a41f701107724b030d4708b250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=98=89=E6=B8=8A?= Date: Thu, 25 May 2023 10:58:45 +0800 Subject: [PATCH] update repo --- egs/aishell/data2vec_paraformer_finetune/run.sh | 1 + egs/aishell/paraformerbert/run.sh | 16 ++++++++++++++++ egs/aishell/transformer/run.sh | 15 +++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/egs/aishell/data2vec_paraformer_finetune/run.sh b/egs/aishell/data2vec_paraformer_finetune/run.sh index 42e590bec..694191ae0 100755 --- a/egs/aishell/data2vec_paraformer_finetune/run.sh +++ b/egs/aishell/data2vec_paraformer_finetune/run.sh @@ -226,5 +226,6 @@ if [ ${stage} -le 6 ] && [ ${stop_stage} -ge 6 ]; then --dataset aishell \ --output_dir $exp_dir/exp/$model_dir \ --vocab_size $vocab_size \ + --nat _nat \ --tag $tag fi \ No newline at end of file diff --git a/egs/aishell/paraformerbert/run.sh b/egs/aishell/paraformerbert/run.sh index 23f7e9b3b..8a614e300 100755 --- a/egs/aishell/paraformerbert/run.sh +++ b/egs/aishell/paraformerbert/run.sh @@ -218,4 +218,20 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then tail -n 3 ${_dir}/text.cer > ${_dir}/text.cer.txt cat ${_dir}/text.cer.txt done +fi + +# Prepare files for ModelScope fine-tuning and inference +if [ ${stage} -le 6 ] && [ ${stop_stage} -ge 6 ]; then + echo "stage 6: ModelScope Preparation" + cp ${feats_dir}/data/${train_set}/cmvn/am.mvn ${exp_dir}/exp/${model_dir}/am.mvn + vocab_size=$(cat ${token_list} | wc -l) + python utils/gen_modelscope_configuration.py \ + --am_model_name $inference_asr_model \ + --mode paraformer \ + --model_name paraformer_bert \ + --dataset aishell \ + --output_dir $exp_dir/exp/$model_dir \ + --vocab_size $vocab_size \ + --nat _nat \ + --tag $tag fi \ No newline at end of file diff --git a/egs/aishell/transformer/run.sh b/egs/aishell/transformer/run.sh index ca3137ba8..38343aefc 100755 --- a/egs/aishell/transformer/run.sh +++ b/egs/aishell/transformer/run.sh @@ -207,4 +207,19 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then tail -n 3 ${_dir}/text.cer > ${_dir}/text.cer.txt cat ${_dir}/text.cer.txt done +fi + +# Prepare files for ModelScope fine-tuning and inference +if [ ${stage} -le 6 ] && [ ${stop_stage} -ge 6 ]; then + echo "stage 6: ModelScope Preparation" + cp ${feats_dir}/data/${train_set}/cmvn/am.mvn ${exp_dir}/exp/${model_dir}/am.mvn + vocab_size=$(cat ${token_list} | wc -l) + python utils/gen_modelscope_configuration.py \ + --am_model_name $inference_asr_model \ + --mode asr \ + --model_name transformer \ + --dataset aishell \ + --output_dir $exp_dir/exp/$model_dir \ + --vocab_size $vocab_size \ + --tag $tag fi \ No newline at end of file