MoodMate β Your Voice-Activated AI Emotional Companion
π― Project Overview
MoodMate is a privacy-first, voice-only AI assistant that uses real-time facial emotion recognition and conversational AI to offer emotional support, guidance, and companionship. It runs in the browser, requires no sign-up, and stores no raw media β only emotion insights locally for users who want to track their mood trends.
π Problem Statement
Millions of people experience stress, anxiety, or low moods but hesitate to seek professional help due to stigma, cost, or accessibility. While chatbots exist, they often lack empathy and context-awareness.
π Goal
To build an emotionally aware, voice-driven AI that:
- Detects a user's current emotional state using facial cues
- Responds via voice to uplift, support, or guide the user
- Offers anonymous, lightweight mood tracking via local storage
- Encourages emotional expression in a safe, user-controlled space
π§© Key Features
Feature | Description |
---|---|
π Facial Emotion Detection | Detects emotions like sadness, anger, happiness, fear, etc., in real-time using the camera. |
π€ Voice-Only Interaction | Uses speech-to-text and text-to-speech for fully voice-based conversations. |
π§ Emotion-Based AI Responses | Adjusts tone and responses based on the detected emotional state. |
π Local Mood Logging | Saves emotion logs (no images or audio) to browser's LocalStorage. |
π‘οΈ Privacy-First Design | No facial data, audio, or video is stored or sent to a server. |
π€ Optional Personalization | Allows users to optionally save preferences locally without sign-up. |
π Mood Trends (Optional UI) | Shows emotion trends over time through a simple chart/graph. |
ποΈ System Architecture
Frontend:
- React.js (or plain HTML/JS)
- FaceAPI.js or TensorFlow.js (for facial emotion detection)
- Web Speech API (for voice input)
- Google TTS / ResponsiveVoice.js (for voice output)
- LocalStorage (for emotion logs and settings)
Backend:
None required (unless adding sign-up / cloud storage later)
Workflow:
- User lands on site β camera + mic permission requested.
- AI starts listening and watching (with permission).
- Emotion detected via face in real-time.
- AI responds with appropriate tone using TTS.
- Detected emotions logged in LocalStorage (if user agrees).
- All data wiped on tab close unless saved locally.
π§ Emotion Detection Logic Example
Detected Emotion | Response Style | Example AI Response |
---|---|---|
Sadness | Supportive & Calm | "It's okay to feel down sometimes. Want to talk about it?" |
Anger | Calming & Grounded | "Let's take a deep breath together. What triggered this feeling?" |
Happiness | Encouraging | "You seem happy! That's amazing. Want to share what made your day?" |
Fear | Reassuring | "You're safe here. Would you like some grounding exercises?" |
π Privacy & Ethics Considerations
- β No raw image/audio/video stored or transmitted
- β All processing done in-browser
- β Mood logs optional and stored only in LocalStorage
- β Camera/mic auto-disabled on exit
- β Clear privacy notice shown before use
- β οΈ Include disclaimer: Not a licensed therapist, for emotional support only
π Future Extensions
- Add journaling feature (voice-to-text diary)
- Suggest breathing/meditation exercises
- Connect to mental health helplines in case of distress
- Introduce optional sign-up for cloud backup
- Build a simple mobile app version with React Native + Expo
π§ Possible Tech Stack
Component | Tech |
---|---|
UI | HTML/CSS/JS or React |
Emotion Detection | FaceAPI.js or TensorFlow.js |
Voice Input | Web Speech API |
Voice Output | Google TTS, ResponsiveVoice.js |
Local Storage | Asyncstorage if possible |
Charts | Chart.js or Recharts (for mood trends) |
Optional Backend | Flask / Firebase (for login features in future) |
π MVP Plan (Minimal Viable Product)
- Set up website with a clean UI
- Enable mic and camera access with permission prompt
- Implement live facial emotion detection (FaceAPI.js)
- Connect speech-to-text and TTS
- Build emotion-response logic
- Store emotions in LocalStorage with timestamps
- Show last 7 days of emotion history in simple chart