Spaces:
Runtime error
Runtime error
| 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 |