Which Applications are accessing the microphone in OS X? I want to list the application names / process ids that are accessing any microphone / sound input device.  This would be great if it were a Terminal command (like lsof) but even an application would be fine, especially if it is managed through Homebrew.
Oversight is an app that can notify when apps begin using microphone or webcam privileges. I don't know how it's implemented under the hood, though.