Skip to content

mute

Silently mute the mic input via AppleScript

Note: The scripts in this hint don't truly mute the mic input; they drop its volume to zero. That's because there's no way to mute an input source via AppleScript (while you can mute an output source). At zero level, the mic will still pick up sounds, but they're very quiet.

Thanks to John Welch, though, you can download an app that will mute the mic with a simple one-click HUD—he posted it in the first comment here, but that download link is broken. Instead, download it via this link, and you should be good to go.

While recording our weekly podcast, The Committed, I often want to mute the microphone input for one reason or another. (Yes, my microphone has a big Mute button on it, but pressing it results in an audible CLICK in the recording.)

There are any number of ways to do this quietly, including just sliding the level down in the Sound System Preferences panel (though it's hard to then get it back to exactly the right spot). There are also any number of App Store apps that will do this for you; some are free, some are paid. And doing it programmatically yourself is as easy as two one-line AppleScripts:

Save those separately, assign keyboard shortcuts (or more quietly, trackpad gestures) using your favorite third-party tool, and you're done.

But I wanted something more. I wanted one script to mute and unmute the volume. I also wanted a visual reminder when I was muted. After an afternoon of slogging around the internet, looking up obscure AppleScript command syntax, and diving into Sal Soghoian's AppleScript 1-2-3 book, I came up with something that seems to work. This short video shows one version of it in action:

Read on for the code and a how-to on putting it to use.

[continue reading…]