most of this copy from Kaldi/egs/{timit,wsj}