| title | InnerVoice |
|---|---|
| emoji | 🗣️ |
| colorFrom | indigo |
| colorTo | purple |
| sdk | docker |
| app_port | 7860 |
Problem Statement inspired by the Smart India Hackathon framework:
Mental health decline is often a silent trajectory. When individuals experience prolonged periods of stress or depression, their primary support networks—therapists, partners, and close friends—are completely disconnected from their day-to-day emotional state, forcing interventions to be reactive (during a crisis) rather than proactive.
Furthermore, traditional written journaling causes high cognitive friction resulting in low adherence, and standard mood-tracking apps rely on subjective 1-to-10 sliders that fail to capture subconscious emotional exhaustion.
InnerVoice is a full-stack platform that completely removes the friction of self-reflection. Users simply speak their mind for 60 seconds into their device.
Instead of just parsing text, InnerVoice listens. It utilizes advanced, localized ML models (wav2vec2) to extract acoustic features (pitch, speech rate, energetic variance, conversational pauses) to uncover latent emotions.
Additionally, InnerVoice breaks the isolation of mental health struggles through its Trusted Circle architecture. The platform automatically broadcasts Weekly Emotional Trend Reports (synthesized by an LLM) to a pre-authenticated support system to facilitate early human intervention.
-
Zero-Friction Voice Journaling
- Client-side recording with real-time waveform visualization.
- Immediate audio-to-text transcription powered by OpenAI Whisper.
-
Acoustic Acoustic Analysis
librosaextracts physiological distress markers: pitch deviation, energy (RMS), speech rate, and zero-crossing rate (pauses/filler words).- Emotion classification via localized HuggingFace Models (
wav2vec2-lg-xlsr-en-speech-emotion-recognition).
-
Trusted Circle Architecture (Brevo Integration)
- Allow users to invite therapists or partners to their secure network.
- Proactive broadcasting of LLM-synthesized Weekly Trend Reports directly to via automatic Transactional Emails using the Brevo API.
- Granular CRUD management of trusted members.
-
Multi-Factor Correlation & Contextual Engagement
- Sleep/Mood Correlation: Visual and statistical mapping linking sleep deprivation securely to mood degradation.
- Contextual Prompts: AI reads your previous 5 entries to generate highly personalized daily journaling prompts specifically tailored to your emotional state.
- Advanced Theming: Fully responsive Dark/Light mode architecture.
- Crisis Safety Net: Local and international resources triggered automatically.
- Frontend: Next.js 14, React context, TailwindCSS, Recharts, Framer Motion
- Backend: FastAPI, SQLAlchemy, SQLite/PostgreSQL
- Communications: Brevo Transactional Email REST API via
httpx - AI/ML:
wav2vec2,librosa, OpenRouter / OpenAI for generation
The backend requires Python 3.10+ and downloads ~1.5GB of ML models on first run.
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtConfiguration:
Rename .env.example to .env and configure your API keys:
OPENROUTER_API_KEY="your_ai_key"
BREVO_API_KEY="your_brevo_api_key"
BREVO_SENDER_EMAIL="your_brevo_verified_sender@email.com"Run Server:
python -m uvicorn main:app --reloadAPI runs locally at http://localhost:8000
cd frontend
npm install
# Start the dev server
npm run devVisit http://localhost:3000 to interact with InnerVoice!
If you want to test the multi-week timeline and Trusted Circle functionality without recording 30 days of real audio, you can seed the SQLite database with rich mock entries:
cd backend
source venv/bin/activate
python seed_data.pyThis script generates a user ID. Add that ID to your frontend/.env.local as NEXT_PUBLIC_DEMO_USER_ID or simply browse in the generic UI Demo Mode.
This project includes a unified Dockerfile mapped to a single port specifically designed to be highly compatible with Hugging Face Spaces.
- Create a new Docker Space on Hugging Face.
- Link it to your GitHub repository OR upload these files directly.
- In the Space Settings, map your Secrets (Environment Variables):
OPENROUTER_API_KEYBREVO_API_KEYBREVO_SENDER_EMAIL
- The Space will automatically build the React static files, install the Python ML stack, and boot both servers behind a unified endpoint!
Audio files are converted in-memory within the backend ML pipeline and are deleted securely and immediately after the acoustic feature-extraction completes. We only permanently store quantified acoustic metrics (floats), the speech transcription string, and the categorical detected emotion.
