嘉渊
2023-05-25 bd825a53ce1562bffab2182f93fc3855c5ee439f
update repo
3个文件已修改
10 ■■■■ 已修改文件
egs/aishell/transformer/utils/compute_cmvn.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
egs/aishell/transformer/utils/compute_cmvn.sh 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
egs/wenetspeech/conformer/run.sh 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
egs/aishell/transformer/utils/compute_cmvn.py
@@ -27,7 +27,7 @@
        help="the path of wav scps",
    )
    parser.add_argument(
        "--config",
        "--config_file",
        type=str,
        help="the config file for computing cmvn",
    )
@@ -89,7 +89,7 @@
    #         var_stats += np.sum(np.square(mat), axis=0)
    #         total_frames += mat.shape[0]
    with open(args.config) as f:
    with open(args.config_file) as f:
        configs = yaml.safe_load(f)
        frontend_configs = configs.get("frontend_conf", {})
        num_mel_bins = frontend_configs.get("n_mels", 80)
egs/aishell/transformer/utils/compute_cmvn.sh
@@ -6,7 +6,7 @@
nj=32
cmd=./utils/run.pl
feats_dim=80
config=
config_file=
scale=1.0
echo "$0 $@"
@@ -29,7 +29,7 @@
    python utils/compute_cmvn.py \
      --dim ${feats_dim} \
      --wav_path $split_dir \
      --config $config \
      --config_file $config_file \
      --idx JOB \
python utils/combine_cmvn_file.py --dim ${feats_dim} --cmvn_dir $split_dir --nj $nj --output_dir ${fbankdir}/cmvn
egs/wenetspeech/conformer/run.sh
@@ -81,5 +81,5 @@
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
    echo "stage 1: Feature and CMVN Generation"
    utils/compute_cmvn.sh ${feats_dir}/data/${train_set} --cmd "$train_cmd" --nj $nj --feats_dim ${feats_dim} --config "$asr_config" --scale 0.1
    utils/compute_cmvn.sh ${feats_dir}/data/${train_set} --cmd "$train_cmd" --nj $nj --feats_dim ${feats_dim} --config_file "$asr_config" --scale 0.1
fi