Skip to content

Mute your mic in Discord on Mac with your AirPods.

License

Notifications You must be signed in to change notification settings

CominAtYou/AirMute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AirMute

Mute your mic in Discord on Mac with your AirPods.

What exactly is this?

As of writing, Discord doesn't support muting the microphone using your AirPods on macOS. This app aims to allow you to do so by registering for mute/unmute notifications from your AirPods, and then instructing Discord to mute or unmute your mic over RPC. Muting or unmuting your mic in Discord will also notify the AirPods that they have been unmuted or muted.

Here's a video of it in action:

AirMute.Demo.mov

Features

  • Mute your Discord mic with your AirPods!
  • A simple, clean, and minimal UI that stays out of your way whilst also providing helpful information on the status of the app.

Requirements

  • A Mac (Intel or Apple Silicon) with macOS 14.0 or higher.
  • A pair of AirPods Pro, AirPods 3 or newer, or AirPods Max.
  • Have the Discord app installed on your Mac. This app doesn't work with the browser version of Discord.

Setup

  1. First, download the disk image of the latest version of the app from the releases page.
  2. Open the disk image and drag the app to your Applications folder.
  3. Next, head to the Discord Developer Portal and create a new application.
  4. Click OAuth2 in the sidebar. Copy your client ID and client secret.
  5. Add a redirect URI to http://localhost.
  6. Launch the app, and click its menu bar icon (it looks like a person with waves) and select "Settings".
    • If you don't see the settings wndow, it might be behind other windows.
  7. Paste your client ID and secret into this window. Then, close the window.
  8. Quit the app by clicking its menu bar icon and selecting "Quit".
  9. Open Discord if it isn't already open.
  10. Open the app again.
  11. If everything worked correctly, clicking the menu bar icon again should yield a line that says Inactive - Not in Voice or Active - In Voice.

How does this work?

The Discord allows any application to interface and issue commands to it (with your approval, of course) over RPC. One of the things that RPC allows for is controlling whether or not your mic is muted or not, meaning that the app is able to instruct Discord to toggle the microphone whenever the AirPods are clicked.

A more technical explanation, please?

Basically:

  • AVAudioApplication.setInputMuteStateChangeHandler(_:) lets you register a callback for when the AirPods have been clicked to mute.
  • Discord exposes a Unix socket in /var/tmp that allows for external processes to control and recieve information about some aspects of the client over RPC.
  • Using these two, it's possible to get notifications for when the AirPods are muted, as well as when the mic has been muted within the Discord client itself, and dispatch the information to both the AirPods or Discord to keep things in sync.

Questions? Answers!

How do I see the current status of the app?

Clicking the app's menu bar icon will yield a menu that'll tell you if the app is active or not (the app is only active when you're in voice), and will also let you know why the app is inactive, or of any errors that might have occured.

What does "Click stem to undeafen" in the app's settings do?

Enabling this setting will let you undeafen yourself by clicking the stem on your AirPods whilst deafened. Turning it off will prevent you from being undeafened when clicking the stem, but it won't unmute you either.

Why do I sometimes have to re-authorize the app in Discord?

Discord requires apps that haven't been approved to re-request authorization from you every seven days. There's nothing that can be done about this, unfortunately. Sorry!

The settings window doesn't show up.

The settings window sometimes like to show up behind other windows. Minimize all of the windows you've got open to locate it, or use Mission Control to find it.

Something not working?

Check the status menu first!

Click the app's menu bar icon to see if any erorrs are being reported. That should give you a pointer as to what might be wrong.

Maybe there's an update!

Check the releases for a newer version of the app. It might have fixed the issue you're experiencing.

No luck?

Open an issue, and let me know what's up. I'll take a look and do my best to track down what might be going awry.

About

Mute your mic in Discord on Mac with your AirPods.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages