A real-time sentiment and toxicity analysis engine for Twitch, developed as a final-year engineering project at the Faculté Polydisciplinaire de Khouribga (FPK). git add README.md
This project addresses the challenges of high-velocity live stream moderation by providing an AI-driven, real-time analysis of chat sentiment. The system categorizes chat activity into Hype, Neutral, and Toxic sentiment patterns, enabling content creators to reduce moderator burnout and maintain safe, inclusive community interactions.
The system architecture focuses on speed and accuracy:
- Ingestion Layer: Persistent TCP socket connections (IRC Protocol) for real-time data streaming.
- Preprocessing Firewall: A custom heuristic
TWITCH_DICTlayer that normalizes gaming-specific slang and emotes (e.g., "Pog", "LULW") into standard linguistic vectors before AI processing. - Inference Engine: A fine-tuned DistilBERT transformer model, optimized to provide classification results in under 200ms.
- Telemetry & UI: A Streamlit-powered dashboard that visualizes sentiment spikes and provides actionable chat telemetry logs.
- Language: Python 3.11.9
- Deep Learning: PyTorch, Hugging Face Transformers
- Visualization: Streamlit
- Data Processing: Pandas, Regex
- Protocol: Twitch IRC API
- BAHRI Ilyass
- EL HICHAMI Oussama
Supervised by: Dr. BAKKOURI Ibtissam, Faculty of Sciences and Techniques of Khouribga (FPK).
- Python Version: 3.11.9
- Clone the repository:
git clone [https://github.com/ilyassbaa/Twitch-Chat-AI-Monitor.git](https://github.com/ilyassbaa/Twitch-Chat-AI-Monitor.git)
cd Twitch-Chat-AI-Monitor
- Create a virtual environment:
python -m venv env
# On Windows:
env\Scripts\activate
# On macOS/Linux:
source env/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the application:
streamlit run app.py
This project is licensed under the MIT License. See the LICENSE file for details.
#Twitch #AI #MachineLearning #NLP #SentimentAnalysis #ToxicityDetection #StreamerTools #SoftwareEngineering #Python #PyTorch #HuggingFace #DistilBERT #Streamlit #DataScience #TechInternship #FPK #RealTimeSystems #ChatModeration #Innovation