— 2025 · Lead developer — senior design
Smart Pause
ML-powered Android app for early sleep apnea warning.
Problem
Sleep apnea affects millions of undiagnosed people worldwide. The clinical gold standard is polysomnography — sleeping overnight in a clinic wired to dozens of sensors. It’s expensive and intimidating.
Smart Pause aims to use the phone that’s already on the bedside table: record breathing sounds during sleep, look for risk signals, and reliably flag when the user should see a doctor.
Approach
The pipeline has three parts:
- Android client (Kotlin): Records short audio windows through the night, extracts features locally, and sends only the numeric feature vector to the backend.
- FastAPI backend (Docker + Google Cloud Run): Accepts numeric feature vectors only — never raw audio. Deliberate for privacy and scaling costs.
- scikit-learn Random Forest: Best precision/recall balance among tested models (logistic regression, SVM, RF, small CNN) with very low inference latency.
After a night of recording, a risk score and recommendation are written to Firebase Firestore.
Lessons
- Feature extraction on the client was both efficient and privacy-preserving — raw audio never left the phone.
- A small, interpretable model (Random Forest) can beat a deep model when the dataset is small and latency is tight.
- FastAPI + Cloud Run is near-perfect for a student budget: costs are effectively zero when there’s no traffic.
- Senior design pacing: while a hardware issue was being resolved, the ML pipeline kept moving.