- Open Automator.app
- Create new Quick Action
- Select Run AppleScript
- Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 100
display notification "Volume set to 100" with title "✅ Microphone is on"
else
set inputVolume to 0
display notification "Volume set to 0" with title "❌ Microphone is off"
end if
set volume input volume inputVolume
- Save as
mute-microphone
- Go to System Preferences -> Keyboard -> Shortcuts -> Services -> General
- Find the
mute-microphone
service and set the hotkey (e.g. control-cmd-option M)
At first, I was frustrated that @henrik242's script didn't work for me. I suspect that many of you may be running into the same issue I had.
The problem for me was that my Shure Digital X2U microphone input had no way of digitally muting it:

My solution was to create a Loopback device using the aptly named app called Loopback with the following simple configuration:

I now have a device that I can select as my input that has an "input volume" slider:

Problem solved! Now @henrik242's unmodified AppleScript works flawlessly on macOS Sonoma 14.3.1.
I got the script itself to run instantly using a keyboard shortcut in FastScripts.
Additional notes:
Automator: I too have noticed in the past that using Automator is slow. Don't bother, unless you need something free.
BetterTouchTool: This works in BetterTouchTool as well, but the "display notification..." doesn't work; you'll have to use the built-in one, but that one can't alternate between Muted/Unmuted notifications.
So, ideally just use FastScripts for this.
I also slightly tweaked @henrik242's script as follows, incorporating some of the flourishes of others:
You can link others to this solution here.