"Providing Immediate Professional Support & Hope"
The Hotline Suicide Help Assistant, code-named Mehak, is an AI-powered crisis intervention prototype designed to provide immediate, warm, and professional support to individuals in distress. Leveraging the OpenAI Realtime API, Mehak offers a low-latency voice-to-voice experience, ensuring that those in need aren't left waiting.
This project was built by Sadaqat & Abdullah with a singular goal: to create a technology-driven bridge for crisis intervention. We believe that in moments of crisis, every second counts. Mehak is designed to:
- Provide an immediate response when human operators might be busy.
- Use a warm, non-judgmental voice (
shimmer) to de-escalate stress. - Identify critical risks in real-time and trigger emergency rescue notifications.
- Bridge the gap between initial contact and professional human intervention.
- Frontend: React + Vite + TypeScript
- Styling: Vanilla CSS (Custom "Serious Paper Art" Design System)
- Backend/API: Node.js + Express (Local) / Vercel Serverless Functions (Production)
- AI Core: OpenAI Realtime API (
gpt-4o-realtime-preview) - Voice:
shimmer(Soft, warm female voice) - Protocols: WebRTC for low-latency audio streaming
Mehak talks and listens in real-time using WebRTC. There is no "record and wait" delay; the conversation flows naturally, which is critical for empathy and rapport.
Behind the scenes, the system continuously analyzes the transcript for crisis markers. It categorizes the distress level into:
- Intake: Initial information gathering.
- Counseling: Active listening and support.
- Crisis Detected: Immediate de-escalation protocols.
- Rescue Notified: Automatic triggering of emergency support if the risk is critical.
The interface uses a custom-built design system inspired by tactile paper and ink.
- Warm Muted Tones: Helping to calm the user visually.
- Split Screen Layout: One side for the user (Client Panel), one side for the AI (Mehak Panel).
- Session Visualization: Real-time progress graph of the triage process.
- Node.js (v18+)
- An OpenAI API Key with access to the Realtime API models.
- Clone the repository:
git clone <repository-url> cd triage_assistant
- Install dependencies:
npm install
- Set up environment variables:
Create a
.envfile in the root directory:OPENAI_API_KEY=your_openai_api_key_here
You can run the full environment (Frontend + Express Token Server) using one command:
npm run dev:full- Frontend: http://localhost:5173
- Backend: http://localhost:3001
├── api/ # Serverless functions (Vercel)
│ └── session.js # OpenAI Session token generator
├── src/
│ ├── components/ # UI Components (ClientPanel, MehakPanel, etc.)
│ ├── hooks/ # Custom hooks (Audio capture, Realtime session)
│ ├── types/ # TypeScript definitions
│ ├── App.tsx # Main application entry
│ ├── index.css # Design system & Global styles
│ └── App.css # Layout & Component styles
├── server.js # Local Express server for token generation
└── vercel.json # Vercel deployment configuration
This project is optimized for Vercel.
- Ensure your
OPENAI_API_KEYis added to your Vercel Project Environment Variables. - Deploy using the Vercel CLI or via GitHub integration.
See deployment_guide.md for step-by-step instructions.
Caution
This is a PROTOTYPE. This AI assistant is not a substitute for professional medical advice, diagnosis, or treatment. It is intended for research and demonstration purposes only. If you or someone you know is in immediate danger, please contact your local emergency services (e.g., 988 in the US/Canada, 999 in the UK).
- Sadaqat
- Abdullah
Built with care for humanity.