0

I wish to build a timer with a start button that once pressed begins to monitor environmental decibel levels through HealthKit. And then once a decibel passes a threshold I wish to log event.

Is something like this available through health kit? Can I actively monitor decibel levels of my environment? Almost as how the native Noise app currently works on the Apple Watch. But I wish to gather this data when the user clicks a start button.

If so, how often can I sample this data? Can I get distinct decibel events that occur between each other within less than a second? A half second? A tenth of a second?

gh0st
  • 1,653
  • 3
  • 27
  • 59
  • You can monitor sound but it's not part of HealthKit. You can make an HK entry for environmentalAudioExposureEvent(s) just like the watch, but HK doesn't do the monitoring. – john elemans Jun 20 '22 at 15:00
  • @johnelemans so what does the monitoring? – gh0st Nov 29 '22 at 21:27
  • HealthKit on the *watch only* can send you a notification of a loudness event, but the API doesn't have any hooks for getting sound levels, afaik. – john elemans Nov 29 '22 at 23:18
  • @johnelemans I’ve come across some of this https://developer.apple.com/documentation/healthkit/hkcategoryvalueenvironmentalaudioexposureevent – gh0st Nov 30 '22 at 03:17

0 Answers0