torchnet / extract_lsr2_vocab.py
milselarch's picture
push to main
df07554
raw
history blame contribute delete
350 Bytes
from TranslatorTrainer import *
vocab_filepaths = (
'data/lsr2_phoneme_vocab.pth',
'data/lsr2_text_char_vocab.pth'
)
trainer = TranslatorTrainer(
word_tokenize=False,
input_char_map=options.char_map,
output_char_map=options.text_char_map,
dataset_type=Datasets.LRS2
)
# trainer.train()
trainer.save_vocabs(*vocab_filepaths)