Text Classification
Transformers
PyTorch
Spanish
roberta
emotion-recognition
speech-emotion-recognition
spanish
affective-computing
umuteam
Eval Results (legacy)
text-embeddings-inference
Instructions to use UMUTeam/MarIA-emotion-es with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use UMUTeam/MarIA-emotion-es with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="UMUTeam/MarIA-emotion-es")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("UMUTeam/MarIA-emotion-es") model = AutoModelForSequenceClassification.from_pretrained("UMUTeam/MarIA-emotion-es") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- es
|
| 4 |
+
license: mit
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-classification
|
| 7 |
+
tags:
|
| 8 |
+
- emotion-recognition
|
| 9 |
+
- speech-emotion-recognition
|
| 10 |
+
- text-classification
|
| 11 |
+
- spanish
|
| 12 |
+
- affective-computing
|
| 13 |
+
- umuteam
|
| 14 |
+
datasets:
|
| 15 |
+
- NLP-UMUTeam/Spanish-MEACorpus-2023
|
| 16 |
+
metrics:
|
| 17 |
+
- accuracy
|
| 18 |
+
- f1
|
| 19 |
+
model-index:
|
| 20 |
+
- name: UMUTeam/MarIA-emotion-es
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: text-classification
|
| 24 |
+
name: Emotion Classification
|
| 25 |
+
dataset:
|
| 26 |
+
name: Spanish MEACorpus 2023
|
| 27 |
+
type: custom
|
| 28 |
+
metrics:
|
| 29 |
+
- type: accuracy
|
| 30 |
+
value: 77.0204
|
| 31 |
+
- type: weighted-f1
|
| 32 |
+
value: 76.8367
|
| 33 |
+
- type: macro-f1
|
| 34 |
+
value: 69.3886
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
# UMUTeam/MarIA-emotion-es
|
| 38 |
+
|
| 39 |
+
## Model description
|
| 40 |
+
|
| 41 |
+
`UMUTeam/MarIA-emotion-es` is a Spanish text-based emotion recognition model developed as part of **speech-emotion**, an open-source multilingual and multimodal toolkit for emotion recognition from speech, text, and multimodal inputs.
|
| 42 |
+
|
| 43 |
+
This model performs **emotion classification from Spanish text**.
|
| 44 |
+
|
| 45 |
+
The model is based on the MarIA Spanish Transformer language model and was fine-tuned for emotion classification tasks in Spanish.
|
| 46 |
+
|
| 47 |
+
It is designed to be used either as a standalone text-only classifier or as part of the broader `speech-emotion` framework, where textual representations can be combined with acoustic representations for multimodal emotion recognition.
|
| 48 |
+
|
| 49 |
+
The model predicts one of the following emotion labels:
|
| 50 |
+
|
| 51 |
+
- `anger`
|
| 52 |
+
- `disgust`
|
| 53 |
+
- `fear`
|
| 54 |
+
- `joy`
|
| 55 |
+
- `neutral`
|
| 56 |
+
- `sadness`
|
| 57 |
+
|
| 58 |
+
## Intended use
|
| 59 |
+
|
| 60 |
+
This model is intended for research and applied scenarios involving Spanish emotion recognition from text, such as:
|
| 61 |
+
|
| 62 |
+
- emotion analysis in transcribed speech
|
| 63 |
+
- conversational analysis
|
| 64 |
+
- affective computing research
|
| 65 |
+
- human-computer interaction
|
| 66 |
+
- educational or exploratory emotion analysis tools
|
| 67 |
+
- integration into multimodal speech emotion recognition pipelines
|
| 68 |
+
|
| 69 |
+
It can be used directly with the Hugging Face `transformers` library or through the `speech-emotion` toolkit.
|
| 70 |
+
|
| 71 |
+
## Out-of-scope use
|
| 72 |
+
|
| 73 |
+
This model should not be used as the sole basis for high-stakes decisions, including but not limited to:
|
| 74 |
+
|
| 75 |
+
- clinical diagnosis
|
| 76 |
+
- mental health assessment
|
| 77 |
+
- employment, legal, or educational decisions
|
| 78 |
+
- biometric profiling or surveillance
|
| 79 |
+
- automated decisions affecting individuals without human oversight
|
| 80 |
+
|
| 81 |
+
Emotion recognition is inherently uncertain and context-dependent. Predictions should be interpreted as model estimates, not as definitive assessments of a person's emotional state.
|
| 82 |
+
|
| 83 |
+
## Training data
|
| 84 |
+
|
| 85 |
+
The model was trained on the Spanish portion of the datasets used in the `speech-emotion` project, primarily based on the **Spanish MEACorpus 2023** dataset.
|
| 86 |
+
|
| 87 |
+
Spanish MEACorpus 2023 is a multimodal speech-text emotion corpus for Spanish emotion analysis collected from natural environments. The dataset contains aligned speech and textual information for emotion recognition tasks.
|
| 88 |
+
|
| 89 |
+
The emotion labels were harmonized into the following six-class taxonomy:
|
| 90 |
+
|
| 91 |
+
- `anger`
|
| 92 |
+
- `disgust`
|
| 93 |
+
- `fear`
|
| 94 |
+
- `joy`
|
| 95 |
+
- `neutral`
|
| 96 |
+
- `sadness`
|
| 97 |
+
|
| 98 |
+
For the Spanish text-based emotion recognition setup:
|
| 99 |
+
|
| 100 |
+
- Training samples: 3,692
|
| 101 |
+
- Validation samples: 410
|
| 102 |
+
- Test samples: 1,027
|
| 103 |
+
|
| 104 |
+
More details about the dataset and preprocessing pipeline are available in the project repository:
|
| 105 |
+
|
| 106 |
+
https://github.com/NLP-UMUTeam/umuteam-speech-emotion
|
| 107 |
+
|
| 108 |
+
## Evaluation
|
| 109 |
+
|
| 110 |
+
The model was evaluated on the Spanish held-out test set used in the `speech-emotion` toolkit.
|
| 111 |
+
|
| 112 |
+
| Language | Mode | Accuracy | Weighted Precision | Weighted F1 | Macro F1 |
|
| 113 |
+
|---|---:|---:|---:|---:|---:|
|
| 114 |
+
| Spanish | Text | 77.0204 | 77.0449 | 76.8367 | 69.3886 |
|
| 115 |
+
|
| 116 |
+
These results correspond to the text-only Spanish configuration. In the full toolkit, multimodal configurations combining audio and text obtain higher performance, showing the benefit of integrating acoustic and linguistic information.
|
| 117 |
+
|
| 118 |
+
## How to use
|
| 119 |
+
|
| 120 |
+
```python
|
| 121 |
+
from transformers import pipeline
|
| 122 |
+
|
| 123 |
+
classifier = pipeline(
|
| 124 |
+
"text-classification",
|
| 125 |
+
model="UMUTeam/MarIA-emotion-es",
|
| 126 |
+
top_k=None
|
| 127 |
+
)
|
| 128 |
+
|
| 129 |
+
text = "Estoy muy feliz de verte de nuevo."
|
| 130 |
+
|
| 131 |
+
predictions = classifier(text)
|
| 132 |
+
print(predictions)
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
You can also use this model through the `speech-emotion` toolkit:
|
| 136 |
+
|
| 137 |
+
```bash
|
| 138 |
+
pip install speech-emotion
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
from speech_emotion import predict_emotion
|
| 143 |
+
|
| 144 |
+
emotion = predict_emotion(
|
| 145 |
+
text="Estoy muy feliz de verte de nuevo.",
|
| 146 |
+
language="es",
|
| 147 |
+
mode="text",
|
| 148 |
+
model_config_path="model.json"
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
print("Detected emotion:", emotion)
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
Repository:
|
| 155 |
+
https://github.com/NLP-UMUTeam/umuteam-speech-emotion
|
| 156 |
+
|
| 157 |
+
## Limitations
|
| 158 |
+
- The model is designed for Spanish text and may not perform reliably on other languages.
|
| 159 |
+
- It predicts a single label from a fixed set of six emotions.
|
| 160 |
+
- Emotion expression is subjective and highly context-dependent.
|
| 161 |
+
- Text-only emotion recognition may miss relevant acoustic or visual cues such as tone of voice, pauses, intensity, facial expressions, or interaction context.
|
| 162 |
+
- Performance may decrease on noisy transcriptions, informal language, code-switching, domain-specific language, or texts that differ substantially from the training data.
|
| 163 |
+
|
| 164 |
+
## Bias and ethical considerations
|
| 165 |
+
Emotion recognition systems may reflect biases present in their training data, including differences related to language variety, register, demographics, topic, or annotation subjectivity.
|
| 166 |
+
|
| 167 |
+
Users should avoid interpreting predictions as objective truths about a person's internal emotional state. The model should be used with transparency, appropriate consent, and human oversight, especially in sensitive contexts.
|
| 168 |
+
|
| 169 |
+
## Citation
|
| 170 |
+
If you use this model in your research, please cite the following works:
|
| 171 |
+
|
| 172 |
+
### speech-emotion toolkit
|
| 173 |
+
```bibtex
|
| 174 |
+
@article{PAN2026102677,
|
| 175 |
+
title = {speech-emotion: A multilingual and multimodal toolkit for emotion recognition from speech},
|
| 176 |
+
journal = {SoftwareX},
|
| 177 |
+
volume = {34},
|
| 178 |
+
pages = {102677},
|
| 179 |
+
year = {2026},
|
| 180 |
+
issn = {2352-7110},
|
| 181 |
+
doi = {https://doi.org/10.1016/j.softx.2026.102677},
|
| 182 |
+
url = {https://www.sciencedirect.com/science/article/pii/S235271102600169X},
|
| 183 |
+
author = {Ronghao Pan and Tomás Bernal-Beltrán and José Antonio García-Díaz and Rafael Valencia-García},
|
| 184 |
+
}
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
### Spanish MEACorpus 2023
|
| 188 |
+
```bibtex
|
| 189 |
+
@article{PAN2024103856,
|
| 190 |
+
title = {Spanish MEACorpus 2023: A multimodal speech–text corpus for emotion analysis in Spanish from natural environments},
|
| 191 |
+
journal = {Computer Standards & Interfaces},
|
| 192 |
+
volume = {90},
|
| 193 |
+
pages = {103856},
|
| 194 |
+
year = {2024},
|
| 195 |
+
issn = {0920-5489},
|
| 196 |
+
doi = {https://doi.org/10.1016/j.csi.2024.103856},
|
| 197 |
+
url = {https://www.sciencedirect.com/science/article/pii/S0920548924000254},
|
| 198 |
+
author = {Ronghao Pan and José Antonio García-Díaz and Miguel Ángel Rodríguez-García and Rafel Valencia-García},
|
| 199 |
+
}
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
## Acknowledgments
|
| 203 |
+
This work is part of the research project LaTe4PoliticES (PID2022-138099OB-I00), funded by MICIU/AEI/10.13039/501100011033 and the European Regional Development Fund (ERDF/EU - FEDER/UE), “A way of making Europe”.
|
| 204 |
+
|
| 205 |
+
Mr. Tomás Bernal-Beltrán is supported by the University of Murcia through the predoctoral programme.
|