Feature Extraction
Transformers
Safetensors
English
usad
automatic-speech-recognition
audio-classification
audio
speech
music
custom_code
Instructions to use MIT-SLS/USAD-Large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MIT-SLS/USAD-Large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="MIT-SLS/USAD-Large", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MIT-SLS/USAD-Large", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| # modeling_usad.py | |
| from transformers import PreTrainedModel | |
| from .configuration_usad import USADConfig | |
| from .usad_model import UsadModel as model | |
| class USADModel(PreTrainedModel): | |
| config_class = USADConfig | |
| def __init__(self, config: USADConfig): | |
| super().__init__(config) | |
| self.model = model(config) | |
| def forward(self, *args, **kwargs): | |
| return self.model(*args, **kwargs) | |
| def load_audio(self, audio_path): | |
| return self.model.load_audio(audio_path) | |