Views
No views yet
wav2vec2-base model for classifying speech register and vocal mode:facebook/wav2vec2-base| Class | Precision | Recall | F1-score |
|---|---|---|---|
| ADS | 0.61 | 0.58 | 0.59 |
| IDS | 0.47 | 0.45 | 0.46 |
| ADS-song | 0.55 | 0.53 | 0.54 |
| IDS-song | 0.48 | 0.47 | 0.47 |
| Macro Avg | 0.53 | 0.51 | 0.52 |
The model achieves a macro-average F1-score of around 52%,
indicating that it successfully captures the broad acoustic differences
between speech and song, and between adult- and infant-directed registers.However, performance is lower for IDS and IDS-song, suggesting that
infant-directed vocalizations share overlapping prosodic and melodic cues
(e.g., higher pitch, slower tempo, greater variability), making them
more challenging to distinguish purely from acoustic information.
1from transformers import pipeline
2
3pipe = pipeline("audio-classification", model="arunps/wav2vec2-base-adsids")
4
5preds = pipe("example_audio.wav")
6print(preds)1from transformers import AutoProcessor, AutoModelForAudioClassification
2import torch, librosa
3
4processor = AutoProcessor.from_pretrained("arunps/wav2vec2-base-adsids")
5model = AutoModelForAudioClassification.from_pretrained("arunps/wav2vec2-base-adsids")
6
7audio, sr = librosa.load("example_audio.wav", sr=16000)
8inputs = processor(audio, sampling_rate=sr, return_tensors="pt", padding=True)
9
10with torch.no_grad():
11 logits = model(**inputs).logits
12
13probs = torch.softmax(logits, dim=-1)
14labels = model.config.id2label
15print({labels[i]: float(p) for i, p in enumerate(probs[0])})Hilton, E. et al. (2021). The Naturalistic Human Vocalizations Corpus. Zenodo. DOI: 10.5281/zenodo.5525161
1@misc{wav2vec2_adsids,
2 author = {Arun Prakash Singh},
3 title = {Wav2Vec2-Base-ADSIDS: Fine-tuned model for Adult-Directed Speech, Infant-Directed Speech, and Song classification},
4 year = {2025},
5 howpublished = {\url{https://huggingface.co/arunps/wav2vec2-base-adsids}},
6 note = {MIT License, trained on the Naturalistic Human Vocalizations Corpus (Hilton et al., 2021)}
7}