Hotkey to Mute Mic on Mac OS X?

54

22

Is there a hotkey I can use or configure to mute the mic on a 13" MacBook Pro (MPB)?

I would prefer an icon or notification to confirm that it is set (even if I need to toggle the option).

wag2639

Posted 2010-08-06T22:12:03.087

Reputation: 5 568

2

I feel this might be outdated for Mountain Lion. See my question here: http://apple.stackexchange.com/questions/66190/why-does-this-applescript-not-actually-set-the-input-volume-to-zero

– kenny – 2012-10-11T18:37:05.397

Answers

24

You can simply Alt-Click on Sound/Speaker icon in the menubar, then select Line In as Input Device to mute the mic.

When you want it back, just select Internal microphone again.

lineine

Studer

Posted 2010-08-06T22:12:03.087

Reputation: 3 448

20On my Macbook Pro I don't have this option. The only input device available is the internal microphone. – Steven – 2015-03-10T17:14:46.277

1I don't have this option either. And this isn't a hotkey to toggle the mic. This requires clicking with the mouse. – Akrikos – 2016-08-18T13:29:53.833

1The OP specifically asked for a hotkey, as opposed to a mouse-based solution. – Reb.Cabin – 2017-12-14T23:30:05.137

23

This can also be accomplished with a simple AppleScript:

tell application "System Events" to set volume input volume 0

Reverse the process:

tell application "System Events" to set volume input volume 100

EDIT

By the way, Soundsource is a free application that gives you nice easy sliders to toggle Speaker/Microphone levels from the menu bar, without the need for pesky extra dialogs.

ghoppe

Posted 2010-08-06T22:12:03.087

Reputation: 6 124

4Soundsource isn't available from rogueamoeba any more and even if y0u can get it from other sites, it hasn't been updated for Mac OS X 10.9 so doesn't run. :-( – RobG – 2015-02-25T13:20:29.680

Soundsource seems awesome – wag2639 – 2010-08-10T16:34:29.623

SoundSource is back up and current, free trial, pay $10 for license. – Alan Blount – 2018-05-30T18:43:21.640

1Setting the input volume to 100 may be way too high -- you do not want to defeat the automatic gain control that applications such as WebEx provide. With this method, everything you say will be distorted and very loud for the first few seconds. Great way to present yourself in a teleconference... – cabo – 2018-10-18T04:55:11.923

21

This works best, especially if you want to assign this script to a Hotkey:

set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
    set inputVolume to 100
else
    set inputVolume to 0
end if
set volume input volume inputVolume

This method doesn't require you to activate the System Preference GUI, or to go through the volume settings of whichever app is active. Instead it is getting the system's volume settings, and then checking to see if the input volume is already 0--if it is it will set the input volume to 100, and if it isn't it will mute the input volume.

Works like a charm.

tkneis

Posted 2010-08-06T22:12:03.087

Reputation: 211

2

Relevant link: https://github.com/pborenstein/togglemic

– spuder – 2015-01-13T16:30:46.407

This doesn't work entirely for me (at least on OSX 10.8). It only seems like it has muted it (displaying zero on the sound preferences input panel), but it actually is just a low threshold, and if I tap on my computer, or speak with a somewhat raised voice, it still picks up sound. – kenny – 2015-03-19T18:30:28.107

This was apparently fixed sometime since 10.8. On OSX 10.11.6 setting inputVolume to 0 mutes as expected. I tested by tapping vigorously on the case right above the mic while recording in QuickTime. Not a peep. – Akrikos – 2016-08-18T13:28:06.973

Take a look at Scottie's answer though: works like this but notifies you which way you just toggled. – Akrikos – 2016-08-18T13:28:54.927

2

This worked for me -- added a hotkey for it via Alfred http://screencast.com/t/6d1wfz97mjfj -- now i just need some kind of visual key on what the current status is

– Alan Blount – 2012-06-26T14:05:21.943

16

Here are instructions to save a script as a service in Automator and assign a hotkey to it in System Preferences.

And here's the script to mute / unmute with a display notification (extended from tkneis's answer).

on run {input, parameters}

    set inputVolume to input volume of (get volume settings)
    if inputVolume = 0 then
        set inputVolume to 100
        set displayNotification to "Microphone Unmuted"
    else
        set inputVolume to 0
        set displayNotification to "Microphone Muted"
    end if
    set volume input volume inputVolume

    display notification displayNotification
    delay 1

    return input
end run

Scottie

Posted 2010-08-06T22:12:03.087

Reputation: 161

This worked very well for me on OS 10.11.6 – Akrikos – 2016-08-17T21:32:03.647

It turns it down to 0 but then something automatically brings it back up. This is on El Capitan...UPDATE:: Found it, had to turn off auto volume on WebEx and Skype – tik27 – 2016-10-19T18:06:30.650

4

Finally I got a perfect solution to mute my mac,

What I did was to install this MuteMyMic , Just to know when having visual representation if the microphone is muted or not all the time.

Then I found this Shush! workflow for Alfred , and then to have an easier access I added a shortcut to rise this Mute/Unmute action, then to turn mic on / off is easier as raising the shortcut, and I know if it's on or off by the MuteMyMic icon on the bar.

I hope this helps anyone else. Enjoy

robertovg

Posted 2010-08-06T22:12:03.087

Reputation: 141

3

The AppleScripts are great! Using them as a global keyboard shortcut also provides the ability to purchase (or build) a foot pedal for keyboard/click-less muting.

For people reading this question that have touchbar Macs, consider MuteMe - it adds a button in the global touchbar area for mute/unmute (and the button turns red when muted). If you don't have a touchbar Mac, you can still use it either from the system tray or as a global keyboard shortcut. It is free.

Daniel Eads

Posted 2010-08-06T22:12:03.087

Reputation: 31

2

Try MuteMyMicFree. It sits in the menu bar so you can adjust the input mic level from zero to max. It takes two clicks (one to open the control and another to set the level), but it's free and does the job less obtrusively than other suggestions.

The Alfred workflow might be good, but you have to buy the power pack on top of the free application to load or even create workflows.

RobG

Posted 2010-08-06T22:12:03.087

Reputation: 161

-1

If you have multiple mic sources, you might try to use this.

Screenshot of Audio MIDI Setup

Audio Midi Setup in Mac, while sounding antiquated, will give you the desired outcome to mute your mic system wide in case you feel a cough coming on.

Andrew Chepurny

Posted 2010-08-06T22:12:03.087

Reputation: 1

Does this have a keyboard shortcut? Because that is what the OP is asking for. – Burgi – 2020-01-17T10:41:22.357