CHECKPOINT_PATH=/public/home/changhl/dataset/speecht5_base_asr.pt
DATA_ROOT=/public/home/changhl/py_project/speecht5_pytorch/valid
SUBSET=valid
BPE_TOKENIZER=/public/home/changhl/py_project/speecht5_pytorch/speecht5_asr/spm_char.model
LABEL_DIR=/public/home/changhl/py_project/speecht5_pytorch/valid
USER_DIR=/public/home/changhl/py_project/SpeechT5/SpeechT5/speecht5
BEAM=4
MAX_TOKENS=1600000
CTC_WEIGHT=0.5
LM_WEIGHT=0.5
LM_PATH=/public/home/changhl/dataset/t5_transformer_lm.pt

fairseq-generate ${DATA_ROOT} \
  --gen-subset ${SUBSET} \
  --bpe-tokenizer ${BPE_TOKENIZER} \
  --user-dir ${USER_DIR} \
  --task speecht5 \
  --t5-task s2t \
  --path ${CHECKPOINT_PATH} \
  --hubert-label-dir ${LABEL_DIR} \
  --ctc-weight ${CTC_WEIGHT} \
  --lm-weight ${LM_WEIGHT} \
  --lm-path ${LM_PATH} \
  --max-tokens ${MAX_TOKENS} \
  --beam ${BEAM} \
  --scoring wer \
  --max-len-a 0 \
  --max-len-b 620 \
  --sample-rate 16000