File size: 788 Bytes
93076b3 25a3333 9cc84bc 25a3333 93076b3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
---
license: cc-by-nc-4.0
language:
- ru
base_model:
- microsoft/wavlm-base-plus
pipeline_tag: audio-classification
---
# Music Detection with WavLM
Detects if audio contains music.
**EER: 2.5–3%** | Based on `microsoft/wavlm-base-plus`
*the best threshold value* `0.2442`
---
## Quick Start
```
git clone https://huggingface.co/MTUCI/MusicDetection
cd MusicDetection
pip install -r requirements.txt
```
## Usage
```python
from model import WavLMForMusicDetection
from safetensors import safe_open
model = WavLMForMusicDetection(batch_size=32, device='cuda')
with safe_open('music_detection.safetensors', framework="pt") as f:
model.load_state_dict({k: f.get_tensor(k) for k in f.keys()})
probs = model.predict_proba(['audio1.mp3', 'audio2.wav']) # → tensor([0.88, 0.11]) |