How anmolrawat990/emotion-recogniton works
This repository implements a Discord bot that reacts to messages with an emoji representing their detected emotion. At startup, the program trains a TF-IDF and logistic-regression classifier from the GoEmotions CSV and saves it as a model artifact. The bot translates text messages to English before classification; for attachments, it downloads audio, transcribes it, and translates the transcript. It adds a reaction when confidence exceeds a threshold. The sampled source shows these main stages in one file; training, Discord, speech-recognition, and translation integrations are not separate repository modules.
Main entry points: multilingualfinal_discord.py Discord bot · cleaned_goemotions.csv Emotion dataset · emotion_model.pkl Saved model
Components 9
Bot runtime
- Startup
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Discord bot
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py
Emotion classification
- Emotion dataset
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Go_Emotion_cleaned_dataset/cleaned_goemotions.csv - Emotion classifier
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Saved model
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/model/emotion_model.pkl
Voice processing
- Voice processor
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py
Other components
- Discord users
- Speech recognition
- Google Translator
Connections 11
- Startup → Emotion classifier: trains
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Startup → Discord bot: starts
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Emotion classifier → Emotion dataset: reads
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Emotion classifier → Saved model: saves and loads
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Discord bot → Discord users: receives and reacts
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Discord bot → Google Translator: translates text
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Discord bot → Emotion classifier: predicts emotion
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Discord bot → Voice processor: processes attachments
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Voice processor → Speech recognition: transcribes audio
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Voice processor → Google Translator: translates transcript
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py - Voice processor → Emotion classifier: supplies transcript
MINI_PROJECT_S-T-E-R/MINI_PROJECT_ANMOL_S-T-E-R/Code/multilingualfinal_discord.py