transformers safetensors wav2vec2 audio-classification generated_from_trainer base_model:hughlan1214/Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned1.1 license:apache-2.0 endpoints_compatible region:us
---
license: apache-2.0
base_model: hughlan1214/Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned1.1
tags:
- generated_from_trainer
metrics:
- accuracy
- precision
- recall
- f1
model-index:
- name: Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned1.1
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned1.1

This model is a fine-tuned version of [hughlan1214/SER_wav2vec2-large-xlsr-53_fine-tuned_1.0](https://huggingface.co/hughlan1214/SER_wav2vec2-large-xlsr-53_fine-tuned_1.0) on a  [Speech Emotion Recognition (en)](https://www.kaggle.com/datasets/dmitrybabko/speech-emotion-recognition-en) dataset.

This dataset includes the 4 most popular datasets in English: Crema, Ravdess, Savee, and Tess, containing a total of over 12,000 .wav audio files. Each of these four datasets includes 6 to 8 different emotional labels.

It achieves the following results on the evaluation set:
- Loss: 1.1815
- Accuracy: 0.5776
- Precision: 0.6236
- Recall: 0.5921
- F1: 0.5806
- 

## For a better performance version, please refer to 

[hughlan1214/Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned2.0](https://huggingface.co/hughlan1214/Speech_Emotion_Recognition_wav2vec2-large-xlsr-53_240304_SER_fine-tuned2.0)


## Model description

The model was obtained through feature extraction using [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) and underwent several rounds of fine-tuning. It predicts the 7 types of emotions contained in speech, aiming to lay the foundation for subsequent use of human micro-expressions on the visual level and context semantics under LLMS to infer user emotions in real-time.

Although the model was trained on purely English datasets, post-release testing showed that it also performs well in predicting emotions in Chinese and French, demonstrating the powerful cross-linguistic capability of the [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) pre-trained model.

```python
emotions = ['angry', 'disgust', 'fear', 'happy', 'neutral', 'sad', 'surprise']
```

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 8
- eval_batch_size: 4
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 5

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 1.5816        | 1.0   | 1048 | 1.4920          | 0.4392   | 0.4568    | 0.4623 | 0.4226 |
| 1.2355        | 2.0   | 2096 | 1.2957          | 0.5135   | 0.6082    | 0.5292 | 0.5192 |
| 1.0605        | 3.0   | 3144 | 1.2225          | 0.5405   | 0.5925    | 0.5531 | 0.5462 |
| 1.0291        | 4.0   | 4192 | 1.2163          | 0.5586   | 0.6215    | 0.5739 | 0.5660 |
| 1.0128        | 5.0   | 5240 | 1.1815          | 0.5776   | 0.6236    | 0.5921 | 0.5806 |


### Framework versions

- Transformers 4.38.1
- Pytorch 2.2.1
- Datasets 2.17.1
- Tokenizers 0.15.2
