MSP-ASR is the audio model in
Multimodal Speech Perception (MSP). It fine-tunes a Wav2Vec2 encoder with a CTC head for English speech recognition and supports greedy decoding or the companion 3-gram language model.
MSP-ASR also supplies the audio encoder to MSP-AVSR. There, its representations participate in both directions of the bidirectional cross-attention fusion block; the standalone checkpoint remains audio-only.
1import torch
2from transformers import AutoModelForCTC, AutoProcessor
3
4model_id = "MahmoodAnaam/MSP-ASR"
5processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
6model = AutoModelForCTC.from_pretrained(model_id, trust_remote_code=True).eval()
7
8inputs = processor(audio="sample.wav", return_tensors="pt")
9with torch.inference_mode():
10 logits = model(**inputs).logits
11
12text = processor.tokenizer.batch_decode(logits.argmax(dim=-1))[0]
13print(text)