readme: ---
  license: apache-2.0
  tags:
  - generated_from_trainer
  metrics:
  - accuracy
  model-index:
  - name: wav2vec2-base-finetuned-sentiment-mesd
    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. -->
  
  # wav2vec2-base-finetuned-sentiment-mesd-v11
  
  This model is a fine-tuned version of [facebook/wav2vec2-base](https://huggingface.co/facebook/wav2vec2-base) on the [MESD](https://huggingface.co/datasets/hackathon-pln-es/MESD) dataset.
  It achieves the following results on the evaluation set:
  - Loss: 0.3071
  - Accuracy: 0.9308
  
  ## Model description
  
  This model was trained to classify underlying sentiment of Spanish audio/speech.
  
  ## Intended uses
  
  - Presenting, recommending and categorizing the audio libraries or other media in general based on detected mood/preferences via user's speech or user's aural environment. A mood lighting system, in addition to the aforementioned features, can be implemented to make user's environment a bit more user-friendly, and and so contribute a little to maintaining the user's mental health and overall welfare.  [Goal 3- SDG]
  
  - Additionally, the model can be trained on data with more class labels in order to be useful particularly in detecting brawls, and any other uneventful scenario. An audio classifier can be integrated in a surveillance system to detect brawls and other unsettling events that can be recognized using "sound." [Goal 16 -SDG]
  
  ## Limitations
  
  -The open-source MESD dataset was used to fine-tune the Wav2Vec2 base model, which contains ~1200 audio recordings, all of which were recorded in professional studios and were only one second long. Out of ~1200 audio recordings only 890 of the recordings were utilized for training. Due to these factors, the model and hence this Gradio application may not be able to perform well in noisy environments or audio with background music or noise. It's also worth mentioning that this model performs poorly when it comes to audio recordings from the class "Fear," which the model often misclassifies.
  
  
  ## Training procedure
  
  ### Training hyperparameters
  
  The following hyperparameters were used during training:
  - learning_rate: 0.0001
  - train_batch_size: 64
  - eval_batch_size: 40
  - seed: 42
  - gradient_accumulation_steps: 4
  - total_train_batch_size: 256
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - num_epochs: 100
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Accuracy |
  |:-------------:|:-----:|:----:|:---------------:|:--------:|
  | No log        | 0.86  | 3    | 1.7516          | 0.3846   |
  | 1.9428        | 1.86  | 6    | 1.6859          | 0.4308   |
  | 1.9428        | 2.86  | 9    | 1.5575          | 0.4692   |
  | 1.9629        | 3.86  | 12   | 1.4160          | 0.4846   |
  | 1.5678        | 4.86  | 15   | 1.2979          | 0.5308   |
  | 1.5678        | 5.86  | 18   | 1.2294          | 0.5308   |
  | 1.4728        | 6.86  | 21   | 1.0703          | 0.5923   |
  | 1.4728        | 7.86  | 24   | 0.9926          | 0.6308   |
  | 1.2588        | 8.86  | 27   | 0.9202          | 0.6846   |
  | 0.991         | 9.86  | 30   | 0.8537          | 0.6846   |
  | 0.991         | 10.86 | 33   | 0.8816          | 0.6769   |
  | 0.9059        | 11.86 | 36   | 0.7149          | 0.7769   |
  | 0.9059        | 12.86 | 39   | 0.7676          | 0.7462   |
  | 0.7901        | 13.86 | 42   | 0.6971          | 0.7538   |
  | 0.6278        | 14.86 | 45   | 0.6671          | 0.7923   |
  | 0.6278        | 15.86 | 48   | 0.5681          | 0.8231   |
  | 0.5678        | 16.86 | 51   | 0.5535          | 0.8154   |
  | 0.5678        | 17.86 | 54   | 0.5947          | 0.8077   |
  | 0.5157        | 18.86 | 57   | 0.6396          | 0.7692   |
  | 0.4189        | 19.86 | 60   | 0.5291          | 0.8077   |
  | 0.4189        | 20.86 | 63   | 0.4600          | 0.8538   |
  | 0.3885        | 21.86 | 66   | 0.5188          | 0.8308   |
  | 0.3885        | 22.86 | 69   | 0.5959          | 0.7923   |
  | 0.3255        | 23.86 | 72   | 0.5240          | 0.8462   |
  | 0.2711        | 24.86 | 75   | 0.5105          | 0.8385   |
  | 0.2711        | 25.86 | 78   | 0.5177          | 0.8231   |
  | 0.2748        | 26.86 | 81   | 0.3302          | 0.8923   |
  | 0.2748        | 27.86 | 84   | 0.4774          | 0.8538   |
  | 0.2379        | 28.86 | 87   | 0.4204          | 0.8769   |
  | 0.1982        | 29.86 | 90   | 0.6540          | 0.7692   |
  | 0.1982        | 30.86 | 93   | 0.5664          | 0.8308   |
  | 0.2171        | 31.86 | 96   | 0.5100          | 0.8462   |
  | 0.2171        | 32.86 | 99   | 0.3924          | 0.8769   |
  | 0.17          | 33.86 | 102  | 0.6002          | 0.8231   |
  | 0.1761        | 34.86 | 105  | 0.4364          | 0.8538   |
  | 0.1761        | 35.86 | 108  | 0.4166          | 0.8692   |
  | 0.1703        | 36.86 | 111  | 0.4374          | 0.8692   |
  | 0.1703        | 37.86 | 114  | 0.3872          | 