InspirationOvernight respiratory symptoms like persistent coughing often leave patients and caregivers relying on vague, subjective memory when describing their health to doctors. During an illness or asthma flare-up, it is nearly impossible to accurately track how often or when you coughed while sleeping. We created CoughSync to turn restless nights into objective, actionable recovery data—providing peace of mind without compromising personal privacy. What it doesCoughSync is an on-device mobile web application that passively tracks and quantifies coughing fits. Running overnight in a low-power listening state, it: Continuously processes short audio micro-buffers at 16 kHz without recording or saving raw voice files. Evaluates sound patterns using real-time machine learning to detect cough signatures with high confidence. Filters duplicate counts from rapid coughing fits using a smart debouncing window.Generates a morning summary dashboard displaying total overnight cough count, peak symptom hours, and a 7-day recovery trend. How we built itWe prototyped CoughSync rapidly using Lovable AI as our primary full-stack builder:Frontend & UI: Generated a responsive React, Vite, and Tailwind CSS web application featuring real-time waveform visualizers and recovery trend charts.On-Device Audio & ML Engine: Integrated low-power audio sampling (Web Audio API / micro-buffering) paired with quantized machine learning models (TensorFlow.js / ONNX WASM audio classifiers) to analyze Mel-Spectrogram patches locally. Data Storage & Backend: Managed state and local event logging via Supabase and on-device storage schemas, completely discarding raw audio buffers instantly after classification. Version Control: Synchronized directly with GitHub to fine-tune signal processing and UI flows.Challenges we ran intoAcoustic Noise Interference: Distinguishing actual coughs from background TV sounds, speech, snoring, and ambient bedroom noise required careful confidence thresholds and pre-filtering.Battery & Power Consumption: Running continuous audio processing overnight risks heavy battery drain, forcing us to optimize for low-power 16 kHz mono sampling and low-overhead decibel triggers. On-Device Constraints: Executing machine learning inference inside the client browser environment without lag or high latency meant using lightweight, quantized model formats. Accomplishments that we're proud of100% Privacy-First Architecture: Successfully built an audio tracking tool that operates locally—zero voice recordings ever leave the user's phone or get uploaded to a cloud server. Hardware-Free Solution: Turned everyday smartphones into smart health monitors without requiring external wearables or sensors. Rapid Full-Stack Delivery: Went from natural-language prompts in Lovable AI to a fully functional interactive prototype in record time.What we learnedHow to leverage AI app builders like Lovable AI to bridge the gap between design prompts and production-ready React codebase.Techniques for running real-time audio classification locally in the browser using Mel-Spectrogram feature extraction. Strategies for balancing background battery consumption with real-time acoustic signal processing.What's next for Cough SyncSymptom & Medication Correlation: Allow users to log medication times (e.g., cough syrup or inhaler use) to see if cough frequency decreases after taking medicine.Doctor Export Reports: Generate downloadable PDF summary reports that patients can share directly with their physician during consultations.Wearable Integration: Expand background monitoring to smartwatch platforms for enhanced battery efficiency and continuous wrist-based health tracking

Built With

Share this project:

Updates

Submission history