| | |
| | | mkdir -p ${sa_asr_exp}/log |
| | | INIT_FILE=${sa_asr_exp}/ddp_init |
| | | |
| | | if [ ! -f "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pth" ]; then |
| | | if [ ! -f "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pb" ]; then |
| | | # download xvector extractor model file |
| | | python local/download_xvector_model.py exp |
| | | log "Successfully download the pretrained xvector extractor to exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pth" |
| | | log "Successfully download the pretrained xvector extractor to exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pb" |
| | | fi |
| | | |
| | | if [ -f $INIT_FILE ];then |
| | |
| | | --init_param "${asr_exp}/valid.acc.ave.pb:decoder.decoders.3:decoder.decoder4.2" \ |
| | | --init_param "${asr_exp}/valid.acc.ave.pb:decoder.decoders.4:decoder.decoder4.3" \ |
| | | --init_param "${asr_exp}/valid.acc.ave.pb:decoder.decoders.5:decoder.decoder4.4" \ |
| | | --init_param "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pth:encoder:spk_encoder" \ |
| | | --init_param "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pth:decoder:spk_encoder:decoder.output_dense" \ |
| | | --init_param "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pb:encoder:spk_encoder" \ |
| | | --init_param "exp/damo/speech_xvector_sv-zh-cn-cnceleb-16k-spk3465-pytorch/sv.pb:decoder:spk_encoder:decoder.output_dense" \ |
| | | --valid_data_path_and_name_and_type "${_asr_valid_dir}/${_scp},speech,${_type}" \ |
| | | --valid_data_path_and_name_and_type "${_asr_valid_dir}/text,text,text" \ |
| | | --valid_data_path_and_name_and_type "${_asr_valid_dir}/oracle_profile_nopadding.scp,profile,npy" \ |
| | |
| | | |
| | | if ${infer_with_pretrained_model}; then |
| | | log "Use ${download_sa_asr_model} for decoding and evaluation" |
| | | |
| | | sa_asr_exp="${expdir}/${download_sa_asr_model}" |
| | | mkdir -p "${sa_asr_exp}" |
| | | |
| | | |
| | | python local/download_pretrained_model_from_modelscope.py $download_sa_asr_model ${expdir} |
| | | inference_sa_asr_model="model.pb" |
| | |
| | | _data="${data_feats}/${dset}" |
| | | _dir="${sa_asr_exp}/${sa_asr_inference_tag}.oracle/${dset}" |
| | | |
| | | python utils/proce_text.py ${_data}/text ${_data}/text.proc |
| | | python utils/proce_text.py ${_dir}/text ${_dir}/text.proc |
| | | sed 's/\$//g' ${_data}/text > ${_data}/text_nosrc |
| | | sed 's/\$//g' ${_dir}/text > ${_dir}/text_nosrc |
| | | |
| | | python utils/proce_text.py ${_data}/text_nosrc ${_data}/text.proc |
| | | python utils/proce_text.py ${_dir}/text_nosrc ${_dir}/text.proc |
| | | |
| | | python utils/compute_wer.py ${_data}/text.proc ${_dir}/text.proc ${_dir}/text.cer |
| | | tail -n 3 ${_dir}/text.cer > ${_dir}/text.cer.txt |
| | |
| | | _data="${data_feats}/${dset}" |
| | | _dir="${sa_asr_exp}/${sa_asr_inference_tag}.cluster/${dset}" |
| | | |
| | | python utils/proce_text.py ${_data}/text ${_data}/text.proc |
| | | python utils/proce_text.py ${_dir}/text ${_dir}/text.proc |
| | | sed 's/\$//g' ${_data}/text > ${_data}/text_nosrc |
| | | sed 's/\$//g' ${_dir}/text > ${_dir}/text_nosrc |
| | | |
| | | python utils/proce_text.py ${_data}/text_nosrc ${_data}/text.proc |
| | | python utils/proce_text.py ${_dir}/text_nosrc ${_dir}/text.proc |
| | | |
| | | python utils/compute_wer.py ${_data}/text.proc ${_dir}/text.proc ${_dir}/text.cer |
| | | tail -n 3 ${_dir}/text.cer > ${_dir}/text.cer.txt |