k2-fsa / snowfall

Moved to https://github.com/k2-fsa/icefall
Apache License 2.0
143 stars 42 forks source link

Support to choose unigram and bigram for P in LF-MMI training. #218

Open csukuangfj opened 3 years ago

csukuangfj commented 3 years ago

With unigram LM for P

export CUDA_VISIBLE_DEVICES="0"

./mmi_att_transformer_train.py \
  --master-port=12355 \
  --full-libri=0 \
  --use-ali-model=0 \
  --max-duration=500 \
  --use-unigram=1

./mmi_att_transformer_decode.py \
  --use-lm-rescoring=1 \
  --num-paths=100 \
  --max-duration=300 \
  --use-unigram=1

With bigram LM for P

export CUDA_VISIBLE_DEVICES="1"

./mmi_att_transformer_train.py \
  --master-port=12356 \
  --full-libri=0 \
  --use-ali-model=0 \
  --max-duration=500 \
  --use-unigram=0

./mmi_att_transformer_decode.py \
  --use-lm-rescoring=1 \
  --num-paths=100 \
  --max-duration=300 \
  --use-unigram=0

Will report the result when it is available (Probably tomorrow morning).

csukuangfj commented 3 years ago

The following shows what the unigram P and bigram P look like when there are only 3 phones: a, b, and c.

unigram bigram

csukuangfj commented 3 years ago

Here are the results for using unigram P and bigram P.

It shows that the WER with unigram P is worse than that of bigram P. Also, the objf of unigram P is slightly higher.

objf values

portfolio_view

WERs

portfolio_viewportfolio_view

portfolio_view portfolio_view