This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
decoder = W2lViterbiDecoder(target_dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w2v = torch.load(model_path) | |
model = Wav2VecCtc.build_model(w2v["args"], target_dict) | |
model.load_state_dict(w2v["model"], strict=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target_dict = fairseq_mod.data.Dictionary.load('ltr_dict.txt') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model_path = "/home/models/wav2vec_big_960h.pt" | |
data_path = "/home/datasets/" |
NewerOlder