Views
No views yet
facebook/hubert-base-ls960
using a two-stage domain-adaptive transfer learning approach, first
on concatenated age-independent emotion datasets, then specialised on
older adults' speech.
Training experiments were conducted using the S3prl toolkit from the SUPERB framework.| Metric | Score |
|---|---|
| Relaxed Precision | 0.7333 |
| Relaxed Recall | 0.7106 |
| Relaxed F1 | 0.7218 |
| Jaccard Index | 0.6223 |
pip install transformers torch librosa1from transformers import HubertForSequenceClassification, Wav2Vec2FeatureExtractor
2import torch
3import librosa
4
5# Load model and feature extractor
6model = HubertForSequenceClassification.from_pretrained(
7 "NadeeshaP/older-adult-speech-emotion-hubert"
8)
9feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(
10 "NadeeshaP/older-adult-speech-emotion-hubert"
11)
12
13model.eval()
14
15# Load and preprocess audio (must be 16kHz)
16audio, sr = librosa.load("your_audio_file.wav", sr=16000, mono=True)
17
18# Extract features
19inputs = feature_extractor(
20 audio,
21 sampling_rate=16000,
22 return_tensors="pt",
23 padding=True
24)
25
26# Run inference
27with torch.no_grad():
28 logits = model(**inputs).logits
29
30# Get predicted emotion
31predicted_id = torch.argmax(logits, dim=-1).item()
32labels = ["Anger", "Happiness", "Sadness", "Neutral"]
33print(f"Predicted emotion: {labels[predicted_id]}")1@inproceedings{pathirana2026emotion,
2 title = {Emotion Recognition in Older Adults' Speech: Toward Empathetic Conversational AI in Ambient Assisted Living},
3 author = {N. Pathirana and A. Htait and E. Wanner},
4 booktitle = {International Conference on AI in Healthcare},
5 publisher = {Springer},
6 year = {2026},
7 note = {in press}
8}