Sometimes I turn up the audio on my MacBook, but then forget to turn it back down. Is there a terminal command I could use to detect if audio is currently playing (sound coming from the speakers)?

I need something similar to [How to detect that the sound is currently playing in Linux?][1] or [Testing if audio devices / sound cards are currently playing?][2], except that neither of those work as they are for Linux.


  [1]: https://stackoverflow.com/questions/17404443/how-to-detect-that-the-sound-is-currently-playing-in-linux
  [2]: https://unix.stackexchange.com/questions/61337/testing-if-audio-devices-sound-cards-are-currently-playing