Menu

I built a Swift 6 macOS audio coordinator with Core Audio taps and Apple Events

#swift#core#macos#apple#article
Reading 0:00
15s threshold

Oreja is an open-source macOS menu bar utility, but the part I think is most relevant here is the architecture. Core Audio process discovery and taps live in an adapter package; samples feed a LevelSampler and speech-shape detector; a platform-neutral Swift coordinator owns pause/resume and pause ownership; Music control is isolated behind an Apple Events port.

The IOProc stays real-time: no allocation, blocking locks, UI, or Swift concurrency hops. The core has no AppKit, Core Audio, or AppleScript imports and is tested with an executable runner because this machine has no XCTest runtime.

Project: https://github.com/EnzoVezzaro/oreja

The app's user-facing job is simple: pause Apple Music while a selected AI app speaks, then resume after quiet. It is an early macOS 14.2+ preview, with a live ChatGPT Voice session still awaiting supervised verification. Technical review of the Swift boundaries is welcome.