Inspiration
My sister got pregnant last year. She was excited, we all were. But during her pregnancy she developed a cardiovascular condition that made it hard for her to breathe normally. She lived on her own most of the time, and we could not always be there.
The hardest part was not the diagnosis. It was not knowing how she was really doing day to day. She would say "I'm fine" because she did not want to worry us. She would not always mention the symptoms she was having. Her emotions were unstable and she kept a lot to herself.
We were not there for the moments that mattered most.
I built Materna because of her, and for every pregnant woman whose family cannot be there every minute but still needs to know she is okay.
What it does
Materna is a daily AI companion for pregnant women. Every morning, she opens the app, looks at her camera, and talks to Materna AI like she would talk to a caring friend.
While she speaks, the camera quietly measures her heart rate using rPPG technology — no wearable, no hospital visit, just her face and the webcam.
Here is what happens in one session:
- Materna greets her by name and asks how she is feeling, remembering what she shared the day before
- The camera measures her heart rate silently in the background
- If she says anything distressing "I need help", "I cannot breathe", "call my family", Materna immediately calls her emergency contact by phone, reading her exact words aloud
- After every session, a health report is emailed to family members with her vitals, symptoms, and an AI summary
- One button generates a full PDF of every check-in across the pregnancy, ready to hand to the doctor at her next appointment
How we built it
The voice agent uses xAI Grok Voice over a real-time WebSocket, streaming audio bidirectionally between the patient and the AI. The rPPG pipeline runs on OpenCV, NumPy, and SciPy, using three cross-validated algorithms to estimate heart rate from webcam footage. Emergency detection runs on every utterance in real time and fires a Twilio outbound voice call when triggered. Reports are generated by GPT-4o-mini and delivered via Gmail SMTP. The full PDF is built with ReportLab from weeks of stored session data. The frontend is React 18, TypeScript, Vite, and Tailwind CSS, with the Web Audio API handling all microphone capture and audio playback.
Challenges we ran into
Getting the AI to sound human was harder than building the rPPG pipeline. The first versions felt like a clinical intake form. The goal was for it to feel like a caring friend — someone who remembers, who notices, who asks the right follow-up question. That took many iterations to get right.
The emergency call had to fire in under five seconds of detection while the voice session was still running. Building that without blocking the audio stream required careful async sequencing.
rPPG signal quality varies significantly with lighting. We implemented three algorithms and cross-validate them so that a low-confidence reading is flagged honestly rather than shown as a fact.
What we learned
The gap is not medical technology. The gap is daily connection. Pregnant women know when something feels off. They just need somewhere to say it, someone who will listen, and the confidence that someone will act if things are serious.
Materna is that somewhere.
What is next
- Real Apple Watch integration (currently simulated for demo)
- Spanish language support
- HIPAA-compliant deployment
- Direct EHR integration for doctor handoff
- Full Edinburgh PPD scale for postpartum depression screening
Built With
- medical
- postgresql
- sendgrid
- twilio
- xai
Log in or sign up for Devpost to join the conversation.