src/transformers/models/speech_encoder_decoder/convert_speech_to_text_wav2vec2_seq2seq_original_to_pytorch.py/create_vocab_dict
def create_vocab_dict(dict_path):
    with open(dict_path, "r", encoding="utf-8") as f:
        lines = f.readlines()
        words = [line.split(" ")[0] for line in lines]

    num_words = len(words)

    vocab_dict = {
        "<s>": 0,
        "<pad>": 1,
        "</s>": 2,
        "<unk>": 3,
    }

    vocab_dict.update({k: v for k, v in zip(words, range(4, num_words + 4))})
    return vocab_dict