Views
No views yet
| Model | Parameters | Dim | Layer |
|---|---|---|---|
| USAD Small | 24M | 384 | 12 |
| USAD Base | 94M | 768 | 12 |
| USAD Large | 330M | 1024 | 24 |
pip install -U torch torchaudio transformers1import torch
2from transformers import AutoModel
3
4# Load pre-trained model
5model = AutoModel.from_pretrained("MIT-SLS/USAD-Base", trust_remote_code=True).cuda().eval()
6
7# Load audio and resample to 16kHz
8wav = model.load_audio("path/to/audio").unsqueeze(0) # (batch_size, wav_len)
9# wav is a float tensor on the same device as the model
10# You can also load waveforms directly with torchaudio.load
11
12# Extract features
13with torch.no_grad():
14 results = model(wav)
15
16# result["x"]: model final output (batch_size, seq_len)
17# result["mel"]: mel fbank (batch_size, seq_len * 2, mel_dim)
18# result["hidden_states"]: list of (batch_size, seq_len, encoder_dim)
19# result["ffn"]: list of (batch_size, seq_len, encoder_dim)1@inproceedings{chang2025usad,
2 title={{USAD}: Universal Speech and Audio Representation via Distillation},
3 author={Chang, Heng-Jui and Bhati, Saurabhchand and Glass, James and Liu, Alexander H.},
4 booktitle={IEEE Automatic Speech Recognition and Understanding Workshop (ASRU)},
5 year={2025}
6}