๐ŸŒฑ MAITRI โ€“ A Mental Wellness Companion for Indian Students

๐Ÿ’ก Inspiration

College life in India isnโ€™t easy. Academic pressure, placements, competitive exams, financial stress, family expectations, hostel loneliness, and fear of failure often pile up at the same time. Mental health struggles donโ€™t wait for convenient moments โ€” they hit during exams, late nights, internships, or even when surrounded by people.

For many Indian students, getting timely mental health support is difficult:

  • Mental health is still a taboo topic
  • Professional help is expensive or inaccessible
  • Friends may not always understand
  • Sometimes, students just donโ€™t know who to talk to

MAITRI โ€” meaning โ€œloving-kindnessโ€ in Sanskrit โ€” was created to fill this gap.
It is a safe, non-judgmental AI companion that listens patiently, responds with empathy, and feels as natural as talking to a trusted friend.


๐Ÿง  What MAITRI Does

MAITRI is an AI-powered mental wellness companion designed especially for students. It offers:

  • ๐Ÿ’ฌ Text-based chat with emotion-aware, empathetic responses
  • ๐ŸŽ™๏ธ Real-time voice conversations for natural, hands-free interaction
  • ๐Ÿ”ฎ 3D interactive visualization โ€” a calming, glowing orb that reacts to your voice
  • ๐ŸŒฌ๏ธ Evidence-based wellness techniques:
    • Breathing exercises
    • Grounding techniques
    • Mindfulness prompts
  • ๐Ÿšจ Critical distress detection to recognize when professional or external help may be required

๐Ÿ› ๏ธ How We Built MAITRI

๐ŸŽจ Frontend

  • React 19 with Vite for fast and smooth performance
  • Glassmorphism UI for a calming, premium experience
  • Three.js with React Three Fiber for the 3D audio-reactive orb

โš™๏ธ Backend

  • Node.js and Express
  • WebSockets for real-time, bidirectional voice communication

๐Ÿค– AI Core

  • Google Gemini 2.5 Flash integrated via LangChain
  • Context-aware and therapeutic response generation

๐Ÿ”Š Voice Pipeline

  • Deepgram Nova-2 for speech-to-text
  • Deepgram Aura for natural, human-like text-to-speech

๐ŸŽง Audio Processing

  • Custom real-time audio streaming using WebSockets
  • Efficient audio chunk handling for low-latency responses

โš ๏ธ Challenges We Faced

  • Audio data handling
    Streaming raw audio over WebSockets caused byte-alignment issues, requiring careful buffer and Int16Array management.

  • Real-time synchronization
    Coordinating the Speech โ†’ AI โ†’ Voice pipeline with minimal latency while preserving conversational context.

  • Voice UI/UX design
    Designing intuitive Start/Stop controls and visual feedback that felt natural during voice interactions.

  • Prompt engineering
    Crafting responses that felt genuinely supportive without being generic, robotic, or dismissive.


๐Ÿ† Accomplishments Weโ€™re Proud Of

  • Built a fully functional voice-first AI companion with sub-second response times
  • Created a stunning 3D audio-reactive orb that brings the AI to life
  • Seamlessly integrated multiple advanced AI services into a single experience
  • Designed a calming, therapeutic glassmorphism-based UI
  • Implemented real-time bidirectional voice streaming from scratch using WebSockets

๐Ÿ“š What We Learned

  • The importance of handling edge cases in audio streaming (byte alignment, buffering, error recovery)
  • How to build fast, real-time AI pipelines that feel instant to users
  • The nuances of designing responsible therapeutic AI systems
  • Leveraging Three.js and React Three Fiber for immersive yet performant 3D visuals
  • The power of WebSockets for building truly interactive voice applications

๐Ÿ”ฎ Whatโ€™s Next for MAITRI

  • ๐Ÿ˜Š Emotion detection via camera
    Analyze facial expressions to proactively offer support based on detected mood

  • ๐Ÿ“Š Mood tracking dashboard
    Visualize emotional trends over time with insights and recommendations

  • ๐ŸŒ Multi-language support
    Support for Indian languages such as Hindi, Telugu, Tamil, Kannada, and more

  • ๐Ÿ“ฑ Mobile application
    Native Android and iOS apps for on-the-go mental wellness support

  • ๐Ÿ”’ Privacy-first architecture
    Local processing options to protect sensitive user conversations

  • ๐Ÿค Professional integration
    Tools for therapists and counselors to supplement their practice with AI assistance


๐Ÿ’™ Closing Note

MAITRI is more than just an application.
It is a compassionate companion for Indian students navigating pressure, uncertainty, and growth โ€” reminding them that they are never alone.

Built With

Share this project:

Updates