Skip to content

Repository files navigation

🧠 Theraπ (Project Pi)

Voice-First, Behavior-Aware AI Companion for Mental Wellness

Right Technique · Right Time · Minimal Intervention


🌟 The Vision

Theraπ isn't just another chatbot. It’s a beautifully designed, deeply empathetic 3D companion that feels alive. In a world experiencing a massive mental health crisis—often hindered by access and stigma—Theraπ offers a judgment-free, 24/7 safe space for users to express themselves.

Instead of overwhelming generic advice, Theraπ runs a transparent behavioral decision loop every time you interact. It looks at your face, listens to your voice, and reads your text to genuinely understand your state of mind.

🚀 Why Theraπ? (The Hook)

Traditional wellness apps fail because they force you to navigate complex menus or interact with rigid text-bots that reset every conversation.

Theraπ is different:

  • 🎭 Fully Multimodal: It reads your text, analyzes your facial emotions (via webcam), and detects the tone of your voice.
  • 🧠 Heuristic Engine, Zero Hallucinations: Risk and emotional state are scored by a deterministic mathematical engine, not an unpredictable LLM.
  • 🗣️ Cultural Empathy: Speaks natively in English, and dynamically switches into Tanglish, Telugulish, or Hinglish depending on your dialect.
  • 🧘 One Micro-Intervention at a Time: Whether it's 2 AM overthinking, pre-exam panic, or work burnout, Theraπ provides one specific technique (like 4-7-8 breathing or CBT reframing) right when you need it.
  • 🛡️ Total Transparency: "Trace Tiles" on the interface show you exactly why the AI is responding the way it is (showing its confidence, strategy, and risk assessment).

✨ Key Features

  • 3D VRM Avatar: A comforting visual presence equipped with real-time, emotion-synced facial expressions.
  • Micro-Intervention Strategies: CBT Reframing, Box Breathing, Grounding, Progressive Muscle Relaxation, and more.
  • Crystal Clear TTS Voice: Powered by Sarvam AI for natural, premium Indian-accented voices.
  • Crisis Escalation Protocol: Built-in safeguards that instantly halt AI interaction and provide national helpline numbers if critical distress is detected.
  • No Diagnostics: Strictly designed as a companion for comfort, avoiding medical claims or clinical diagnosis.

🛠️ Tech Stack & Architecture

  • Frontend: Vanilla HTML/JS/CSS, Three.js + VRM Loader, face-api.js
  • Backend Orchestration: Python (FastAPI + Uvicorn)
  • Generative AI: Groq (Llama-3.1-8b-instant) for empathetic text generation.
  • Audio Output: Sarvam AI Text-to-Speech

💻 Quick Start Guide

Ready to experience Theraπ on your local machine? Let's get started.

1. Prerequisites

  • Python 3.10+
  • A .env file in the root directory (alongside api.py) with your keys:
    GROQ_API_KEY=your_groq_key
    SARVAM_API_KEY=your_sarvam_key

2. Launch the Backend

The FastAPI backend acts as the brain and proxy.

python api.py

(Runs on http://localhost:8016)

3. Launch the Frontend

Host the static interface.

python -m http.server 8001

(Access via http://localhost:8001/index.html)


🤝 Contributing

Mental wellness is a universal need, and improving this open-source companion is a community effort. If you have ideas for better heuristic scoring, more refined VRM animations, or expanding language support, we’d love to see your Pull Requests!

Your safe space, engineered with empathy. 💖

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages