CoolFace
Modelpublic

zwglory/wenet_efficient_conformer_aishell_v2

sourceHugging Faceapache-2.0updated 4y agoView on Hugging Face
1likes
Model Card

Efficient Conformer v2 for non-streaming ASR

Specification: https://github.com/wenet-e2e/wenet/pull/1636

Aishell-1 Results

  • Feature info:
  • using fbank feature, cmvn, speed perturb, dither
  • Training info:
  • train_u2++_efficonformer_v2.yaml
  • 8 gpu, batch size 16, acc_grad 1, 200 epochs
  • lr 0.001, warmup_steps 25000
  • Model info:
  • Model Params: 49,354,651
  • Downsample rate: 1/2 (conv2d2) * 1/4 (efficonformer block)
  • encoderdim 256, outputsize 256, head 8, linear_units 2048
  • numblocks 12, cnnmodulekernel 15, groupsize 3
  • Decoding info:
  • ctcweight 0.5, reverseweight 0.3, average_num 20
decoding modefull1816
attention decoder4.875.035.07
ctc prefix beam search4.975.185.20
attention rescoring4.564.754.77

Start to Use

Install WeNet follow: https://wenet.org.cn/wenet/install.html#install-for-training

Decode

sh
cd wenet/examples/aishell/s0
dir=exp/wenet_efficient_conformer_aishell_v2/

ctc_weight=0.5
reverse_weight=0.3
decoding_chunk_size=-1
mode="attention_rescoring"

test_dir=$dir/test_${mode}
mkdir -p $test_dir

# Decode
nohup python wenet/bin/recognize.py --gpu 0 \
    --mode $mode \
    --config $dir/train.yaml \
    --data_type "raw" \
    --test_data data/test/data.list \
    --checkpoint $dir/final.pt \
    --beam_size 10 \
    --batch_size 1 \
    --penalty 0.0 \
    --dict $dir/words.txt \
    --ctc_weight $ctc_weight \
    --reverse_weight $reverse_weight \
    --result_file $test_dir/text \
    ${decoding_chunk_size:+--decoding_chunk_size $decoding_chunk_size} > logs/decode_aishell.log &

# CER
python tools/compute-cer.py --char=1 --v=1 \
      data/test/text $test_dir/text > $test_dir/cer.txt