| --- |
| 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]) |