How do I toggle the microphone with a command or with Autokey
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
qhat do you see from "pactl subscribe" when you toggle the microphone using pavucontrol (or some other gui tool)? You should see something like:
Code:
Event 'change' on source #1
I this case "1" is index for source (microphone). Presumably for you it is something else. Maybe 0, maybe 2 etc. Once you know that index you should be able to use:
Do you mean like a hardware toggle? Cause many apps have built in toggles. Skype, mumble, and things have keys you can set to USE the microphone, otherwise it's muted. And probably settings to avoid the hassle as well. If it's not in use you can modprobe -r the module for the sound card. I have a headphone preamp for my output that has a mute (and mono) toggle button. In terms of microphones (external) you can just unplug them. The advantage of an XLR connection is that it doesn't pop when you plug/unplug it. Versus TRS that does pop. A lot of interfaces have gain knobs, not technically muted, but you can turn those down to inaudible levels.
works perfectly in muting my internal microphone, tested by recording my voice in Audacity and running the command twice in the middle of the recording to mute my microphone and then unmute it again.
Not sure what I did wrong yesterday but this moring:
pactl set-source-mute 0 toggle
Worked to toggle my microphone.
Thanks.
Quote:
Originally Posted by hydrurga
Just to confirm that evo2's command:
Code:
pactl set-source-mute 1 toggle
works perfectly in muting my internal microphone, tested by recording my voice in Audacity and running the command twice in the middle of the recording to mute my microphone and then unmute it again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.