 Import model and processor. Using GPU if available model_name = 'viktor-enzell/wav2vec2-large-voxrex-swedish-4gram' device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = Wav2Vec2ForCTC.from_pretrained(model_name).to(device); processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name)  