Apple introduced API that enables recording audio from other apps or the entire system in macOS 14.4, but it's poorly documented and there's no sample code available, so I decided to fix that: https://github.com/insidegui/AudioCap
GitHub - insidegui/AudioCap: Sample code for recording system audio on macOS 14.4+

Sample code for recording system audio on macOS 14.4+ - insidegui/AudioCap

GitHub
@_inside How is this different from using ScreenCaptureKit to capture audio? That was introduced in macOS 13. Thanks.
@matt I can’t answer that because I’m not familiar with ScreenCaptureKit, but I guess with SCK you’d need screen recording permission?
@_inside @matt Yeah, AFAIK you need screen recording permissions to be able to request available content so you can filter what you want to record (and thus get audio data from)