Downloads · 30 days
3
2% of all-time downloads
vkushwahaa/audio-emotion-recognition
audio-emotion-recognition is a machine learning model from vkushwahaa. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras.
This model recognizes emotions in speech audio files. It can detect the following emotions: - Angry - Disgust - Fear - Happy - Neutral - Sad - Surprise
Downloads · 30 days
3
2% of all-time downloads
All-time downloads
122
Public
Repo size
157 MB
Likes
1
Public
Click a slice to open those files.
.keras7.2 MB · 100%
From the Hugging Face model README
This model recognizes emotions in speech audio files. It can detect the following emotions:
This model uses a two-stage approach:
pip install tensorflow librosa huggingface_hub tensorflow_hub
from huggingface_hub import snapshot_download
import os
import sys
sys.path.append(snapshot_download(repo_id="vkushwahaa/audio-emotion-recognition"))
from emotion_recognizer import load_from_hf
# Load model
recognizer = load_from_hf()
# Predict emotion from audio file
result = recognizer.predict("path/to/audio.wav")
# Print results
print(f"Predicted emotion: {result['predicted_emotion']} (confidence: {result['confidence']:.2f})")
python emotion_recognizer.py path/to/audio.wav
This model was trained on multiple datasets:
The model uses YAMNet embeddings as features and employs data augmentation techniques to improve robustness.