Inspiration

Mental health support remains inaccessible to millions worldwide. Long wait times, high costs, and stigma prevent people from seeking help when they need it most. We were inspired by the potential of open-source AI to democratize mental wellness — creating a tool that listens, understands, and guides users without judgment, 24/7, entirely on their own device.

What It Does

MindBridge is a privacy-first AI mental health companion powered by gpt-oss. It engages users in natural voice conversations, detects emotional states through sentiment analysis and acoustic patterns, and provides personalized coping strategies, breathing exercises, and guided reflections. All processing happens locally — no data ever leaves the device.

Key features:

  • 🎙️ Voice-first interaction — Natural conversations via speech-to-text and text-to-speech
  • 🧠 Emotion detection — Real-time sentiment and stress-level analysis
  • 📊 Personalized insights — Adaptive responses based on conversation history
  • 🔒 100% offline — Complete privacy with local gpt-oss inference

How We Built It

We started with gpt-oss (OpenAI's open-source model) as our foundation, fine-tuning it on curated mental health dialogues and therapeutic techniques. The architecture consists of:

  • Frontend: React + TypeScript with Web Speech API for voice input/output
  • Backend: Python FastAPI serving the fine-tuned gpt-oss model via llama.cpp
  • ML Pipeline: Custom emotion classifier built on top of gpt-oss embeddings
  • Local Inference: Quantized model (Q4_K_M) running on consumer hardware

We used Whisper for speech recognition and Coqui TTS for natural voice responses, both running locally alongside gpt-oss.

Challenges We Faced

  1. Model size vs. latency: Running a 7B parameter model locally on laptops required aggressive quantization. We experimented with Q4 and Q5 formats to find the sweet spot between speed and coherence.

  2. Emotion accuracy: Detecting nuanced emotional states from text alone proved difficult. We combined acoustic features (pitch, tempo, pauses) with semantic analysis to improve accuracy from 68% to 84%.

  3. Safety guardrails: Ensuring the AI provides supportive but non-clinical advice required careful prompt engineering and a robust fallback system for crisis detection.

  4. Offline speech synthesis: High-quality TTS models are typically cloud-dependent. We integrated Coqui TTS with a custom voice clone to maintain quality without network access.

What We Learned

  • Fine-tuning open-source models on domain-specific data can rival proprietary APIs for specialized tasks
  • Local inference is viable for real-time applications with proper optimization
  • Voice interfaces dramatically lower barriers to engagement for mental health tools
  • Privacy-by-design is not just ethical — it's a competitive advantage

What's Next

  • Expand to multilingual support (starting with Spanish and Mandarin)
  • Partner with licensed therapists to validate and improve response quality
  • Develop a companion wearable for biometric integration (heart rate, sleep data)
  • Publish our fine-tuning dataset and methodology for the research community

Built With

Share this project:

Updates