Show HN: Live breath detection and biofeedback from a phone microphone

github.com

64 points by felixzeller 3 days ago

Hi everyone, I am Felix, a famliy doctor from ZH, Switzerland. A couple of month ago I started this little project called shii • haa, a breathing app that uses the phone`s microphone for live biofeedback

My prior work in emergency medicine and intensive care was closesly linked to breathing, mostly in critical situations... and let me to reevaluate my own way of breathing. over time one question popped into my mind: can medical knowledge and biofeedback make an app actually promote self-awareness instead of attaching your goals to the award system of the app.

it combines signal processing, a breathing state machine and ML. The state machine follows inhale, exhale and transitions in the mic signal. A quality layer rejects noisy or ambiguous windows before signals are used for feedback. All processing is done on-device, no speech or raw audio is uploaded.

What I'm trying to avoid is turning breathing into another score or game. The app gives feedback on rhythm, depth and regularity, but the point is more "notice what you are doing" than "perform well".

I'd be interested in feedback, especially from people who have worked on signal processing, health UX, or Android/iOS audio issues.

felixzeller 8 hours ago

An update after the feedback here: I added ATMOS, a BIOS-style command layer for the browser version of shii•haa: https://shiihaa.app/atmos/ It explains how to open the interface: no login requirements, no availability issues. Thanks again to everyone. It helped shape the interface.

frnz 2 days ago

Audio normalizing seems to be quite hard for this kind of use. I tried this 20 yrs ago with parts of a (mouse-)pointer device, a rigid nylon strap around the chest and 8 cm of flexible length in between. Mouse pointer wheel (one dimension only) was driven by change of length. For some hours of fiddling it was quite reliable.

  • felixzeller 2 days ago

    That`s very cool. I chose the phone mic, because everybody already has one, no extra device needed. The downside is normalization: from room noise to breathing style. I do use an ML layer to deal with some of these variations but only after basic signal checks. The hard part is to decide when the microphone signal is too ambiguous to use at all...

xattt 2 days ago

What about in call centre situations to monitor employees or customers’ emotional states, or fingerprinting customers?

  • felixzeller 2 days ago

    Exactly the kind of use I don`t want to support. I do not upload raw audio or speech and I don`t try to identify individuals from the signal. The app was built for voluntary feedback on mood and rhythm.

esquire_900 2 days ago

Very interesting idea, I hope you can progress this into a well working, proven application.

I tried to do something very similar a year or 2 ago, more directed towards meditation. (Ie as a helper that uses breath to detect a wandering mind). A microphone in itself wasn't sufficient in my case, and detection was quite hard. I ended up using wired earbuds with microphones.

Nice focus as well, less scoring and more signal. All the best in your project!

  • felixzeller 2 days ago

    Thank you so much for your kind words. The microphone is the hard part, so I am trying to learn where the limits are instead of just pretending they do not exist... What happened to your project?

47282847 2 days ago

Sounds interesting. App not available in my region (iOS, Germany).

  • felixzeller 2 days ago

    Thanks for catching this. The iOS app is currently blocked in Germany (and some other EU countries) because DSA information is still pending. Hopefully soon. Android is available there. The biofeedback can be accessed via browser without creating an account. The link and details are in the repo README.

    • 47282847 1 day ago

      Tried it on website but I always get Signal too weak, even if I breathe heavily, in an otherwise silent room. iPhone 13mini.

      • felixzeller 1 day ago

        Great feedback, thank you. The browser version still depends on the device/browser mic chain and it looks like the threshold is too strict on some iPhone/Safari setups. I`ll look into this case. It should not get stuck at signal too weak if the room is silent and breathing clearly audible.

ncr100 2 days ago

OT did GitHub change their default fonts? This MD file shows up "differently" than I am used to, today.

muhammadusman 3 days ago

can you please review login requirement?

maartenh 3 days ago

Sounds interesting. Unfortunately not available in my country in the Android app store. I live in The Netherlands. If you're looking for feedback, you might want to double check this :)

  • felixzeller 2 days ago

    The Android app is now available in all Play Store countries except mainland China