During voice conversations in Skype/Gmail/etc. I would like to mute/unmute the microphone without having to go through all these steps each time:

  • Sound indicator
    • Sound preferences
      • Select Input
        • Mute/unmute the microphone


I'm looking for either:

  • an application that can do this from the commandline,
  • a way I can assign a keyboard shortcut that can mute/unmute the microphone
link|improve this question
1  
If you use Empathy for voice chat, it has a mute button built-in (that works with Google Talk at least, Skype isn't supported yet). – JanC Nov 8 '10 at 14:56
I'm looking for something that can be made to run through a shortcut, similar to the main volume mute/unmute laptop toggle button. – Lucian Adrian Grijincu Nov 8 '10 at 16:03
feedback

4 Answers

up vote 5 down vote accepted

Go to

System -> Preferences -> Keyboard shortcuts

Adding keyboard shortcuts

Click on Add

Add a command to toggle the microphone

Fill in

Toggle microphone

amixer set Capture toggle

Click Apply and then associate a new key with this command (e.g. the Pause/Break key).

link|improve this answer
feedback

pacmd is the command line interface to PulseAudio (the sound subsystem used in recent releases). I don't know what the exact command is you'd need but I think you'd want to play with the set-sink-input-mute function.

pacmd is interactive when run without instructions so you have a good opportunity to play around with it and convert that into a one-line function for toggling mute.

link|improve this answer
feedback

You can mute with:

/usr/bin/amixer -q -c 0 sset 'Master',0 mute

Unmute:

/usr/bin/amixer -q -c 0 sset 'Master',0 unmute

You just need to replace 'Master' with the appropriate mixer name, on the terminal use "amixer" to get a list of mixer devices.

About setting the keyboard shortcut check the answers for How can I find which command is bound to a given keyboard shortcut?

link|improve this answer
These mute the sound from my speakers, not the microphone, but thanks. – Lucian Adrian Grijincu Nov 8 '10 at 15:29
You just need to replace 'Master' with the appropriate mixer name, on the terminal use "amixer" to get a list of mixer devices. – João Pinto Nov 8 '10 at 15:36
This seems to work: # amixer set Capture toggle – Lucian Adrian Grijincu Nov 8 '10 at 15:53
Can you edit your response (I don't have the necessary karma) to include this answer so I'll accept it? – Lucian Adrian Grijincu Nov 8 '10 at 16:00
feedback

In Ubuntu 11.10 you there is a default shortcut key for pause to be mic toggle

link|improve this answer
Could you say which it is for others that arrive here? – Lucian Adrian Grijincu Apr 20 at 0:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.