Audio Classification
Transformers.js
ONNX
Transformers
PyTorch
English
wav2vec2
audio
musical-instruments
Eval Results (legacy)
Instructions to use onnx-community/Musical-Instrument-Classification-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/Musical-Instrument-Classification-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('audio-classification', 'onnx-community/Musical-Instrument-Classification-ONNX'); - Transformers
How to use onnx-community/Musical-Instrument-Classification-ONNX with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="onnx-community/Musical-Instrument-Classification-ONNX")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForAudioClassification processor = AutoProcessor.from_pretrained("onnx-community/Musical-Instrument-Classification-ONNX") model = AutoModelForAudioClassification.from_pretrained("onnx-community/Musical-Instrument-Classification-ONNX", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download preprocessor_config.json from onnx-community/Musical-Instrument-Classification-ONNX: direct link, hf CLI and curl.
- Browser
- Download file 215 Bytes
-
https://huggingface.co/onnx-community/Musical-Instrument-Classification-ONNX/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://onnx-community/Musical-Instrument-Classification-ONNX/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/onnx-community/Musical-Instrument-Classification-ONNX/resolve/main/preprocessor_config.json
215 Bytes
| { | |
| "do_normalize": true, | |
| "feature_extractor_type": "Wav2Vec2FeatureExtractor", | |
| "feature_size": 1, | |
| "padding_side": "right", | |
| "padding_value": 0.0, | |
| "return_attention_mask": false, | |
| "sampling_rate": 16000 | |
| } | |