JustNikunj's picture
finally done maybe
8f209ca
---
title: "Hindi Speech Emotion & Recommendation System"
emoji: 🎭
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: "4.44.0"
app_file: app.py
pinned: false
license: mit
---
# 🎭 Hindi Speech Emotion & Action Recommendation System
**An AI-powered pipeline for Hindi/Hinglish emotion analysis and contextual action recommendations.**
---
## 🧩 System Pipeline
πŸŽ™οΈ **Audio Input (Hindi/Hinglish)** β†’
πŸ“ **Indic Conformer 600M ASR** β†’
🎭 **XLM-RoBERTa Emotion Detection (13 emotions)** β†’
πŸ’­ **Hindi Sentiment Analysis** β†’
πŸ€– **Llama 3.1 8B Recommendation Generation** β†’
βœ… **Validation & Helpline Integration** β†’
πŸ’¬ **Personalized Hindi Recommendation**
---
## ✨ Features
- πŸŽ™οΈ **Advanced ASR** β€” Indic Conformer 600M for accurate Hindi/Hinglish transcription
- 🎭 **13 Emotions** β€” joy, happiness, sadness, anger, fear, distress, panic, love, surprise, calm, neutral, excitement, frustration
- πŸ’­ **Sentiment Analysis** β€” Positive/Neutral/Negative with confidence scores
- πŸ€– **AI Recommendations** β€” Context-aware suggestions powered by Llama 3.1 8B
- 🚨 **Crisis Detection** β€” 100+ emergency keywords in Hindi/English
- 🧠 **Mental Health Support** β€” Specialized detection for depression, anxiety, isolation
- πŸ’” **Grief & Relationship** β€” Targeted support for loss and relationship distress
- βœ… **Automatic Validation** β€” Ensures helplines are included when needed
---
## βš™οΈ Configuration
Set the following environment variable in **Space Settings β†’ Variables**:
| Variable | Description |
|-----------|--------------|
| `HF_TOKEN` | Your Hugging Face token (required for Llama 3.1 access) |
- Get token from: [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
- Accept Llama 3.1 license here: [meta-llama/Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct)
---
## πŸ†˜ Emergency Helplines (India)
| Service | Number | Availability |
|----------|---------|--------------|
| 🚨 Police / Emergency | **112** | 24/7 |
| πŸ‘© Women’s Helpline | **181** | 24/7 |
| πŸ†˜ Women in Distress | **1091** | 24/7 |
| 🧠 Vandrevala Foundation | **9152987821** | 24/7 |
| πŸ₯ NIMHANS Mental Health | **08046110007** | 24/7 |
| πŸ’™ AASRA Suicide Prevention | **9820466726** | 24/7 |
---
## 🧠 Models Used
| Task | Model |
|------|--------|
| **ASR** | ai4bharat/indic-conformer-600m-multilingual |
| **Sentiment** | LondonStory/txlm-roberta-hindi-sentiment |
| **Emotion** | joeddav/xlm-roberta-large-xnli |
| **LLM** | meta-llama/Llama-3.1-8B-Instruct |
---
## πŸ”’ Privacy & Safety
- βœ… No permanent data storage
- βœ… All processing in-memory
- βœ… Automatic helpline integration
- βœ… Crisis prioritization
- βœ… Privacy-first architecture
---
## 🧾 License
MIT Β© 2025
Developed with ❀️ by Nikunj Kumar