Inspiration
Winter 2025 brings cooler temperatures, but for many urban areas, it also brings the "Winter Inversion"—trapping smog and particulate matter closer to the ground. In cities like Visakhapatnam, this invisible threat spikes respiratory issues.
I wanted to tackle the "Missing Amps" challenge by interpreting "Amps" not just as voltage, but as Audio Amplitude. I asked: Can I use the "missing" signals in our own breath to detect health risks before they become severe?
What it does
Respiro is a browser-based "Winter Health Shield" that combines environmental data with bio-acoustic monitoring.
- Hyper-Local Environment Scan: It uses the Geolocation API and OpenStreetMap (Nominatim) to pinpoint your exact suburb (e.g., "Madhurawada, Visakhapatnam"), avoiding generic city-wide averages. It then pulls real-time PM2.5 data.
- Bio-Acoustic Lung Monitor: Using the Web Audio API, it turns your microphone into a diagnostic tool. It listens for the specific acoustic signature of a cough (sudden amplitude spikes) while filtering out background noise.
- Smart Correlation: It doesn't just say "Air is Bad." It correlates the air quality with your symptoms. If the air is "Hazy" (PM2.5 > 90 ) and you are coughing, it upgrades the risk level to "Action Required."
How we built it
I built Respiro using React.js and Vite for a fast, modern frontend. The Logic: Instead of heavy AI models that slow down the browser, we wrote a custom signal processing algorithm using the Web Audio API AnalyserNode. I calculated the volume spike using this logic: Δ Amplitude=Volumecurrent−Volumelast If ΔAmplitude>20 and Volumecurrent >65, we register a cough. This filters out heavy breathing (slow rise) and only catches percussive sounds.
The Data: I utilized OpenWeatherMap for pollution data and OpenStreetMap for reverse geocoding to get street-level accuracy. The UI: I implemented a dynamic Glassmorphism design where the entire atmospheric background changes color (Green →Orange →Red) based on the live pollution data, creating an immersive experience.
Challenges we ran into
- The "Hyderabad" Bug: Initially, the app kept showing our location as Hyderabad because it was relying on ISP IP addresses. I fixed this by implementing navigator.geolocation with high-accuracy mode and verifying it with raw GPS coordinate debugging.
- Wind vs. Cough: Early versions triggered alerts when users simply breathed into the mic. I had to refine our algorithm to distinguish between the gradual amplitude rise of wind noise versus the instant spike of a cough.
- Scaring the User: Testing revealed that seeing "Hazardous Air" caused panic. I rewrote the logic to follow Indian CPCB Standards and used descriptive terms like "Hazy" or "Heavy" instead of judgment words like "Poor," paired with actionable advice (e.g., "Drink ginger tea").
Accomplishments that we're proud of
Building a fully functional audio analysis tool without external Python backends—it runs 100% in the client browser. Achieving precise suburb-level location detection. Creating a UI that looks and feels like a native mobile app.
What's next for Respiro: Winter Health Shield
Historical Tracking: Saving session data to track if your cough worsens over the winter. Heatmaps: Anonymously aggregating "cough events" to visualize flu hotspots on a city map.
Built With
- css3
- javascript
- openstreetmap-api
- openweathermap-api
- react
- vite
- web-audio-api
Log in or sign up for Devpost to join the conversation.