Menu

📰
0

How We Solved iOS Audio Analysis for Breathwork Biofeedback

DEV Community: capacitor·Felix Zeller·about 1 month ago
#aSlDaFTN
#dev#class#code#capacitor#article#video
Reading 0:00
15s threshold

Real-time breath detection sounds straightforward until you try to ship it on iOS. Our app, shii·haa, guides users through breathwork and provides live biofeedback — it needs to hear you breathe and respond, frame by frame. In the browser, this is about twenty lines of Web Audio API code. On iOS inside a Capacitor app, it turned into a three-month rabbit hole that ended with us writing a native Swift plugin and open-sourcing it. This is the story of that journey. Plugin links: npm: npmjs.com/package/@shiihaa/capacitor-audio-analysis GitHub: github.com/shiihaa-app/capacitor-audio-analysis The Challenge shii·haa is a breathwork and biofeedback app built with Ionic, Capacitor, and Vue 3, running as a progressive web app, an iOS app, and an Android app from a single codebase. One of its core features is real-time audio analysis: the app listens to the user's breathing through the microphone, computes the energy envelope of the signal, and uses that to detect inhale and exhale phases.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More