Skip to content

About

A virtual HID headset device with easy integration into your bars.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Virtual Headset logo: a red microphone on a slate tile

Virtual Headset

CI Release License: MIT

A mute button for any microphone that Zoom and Google Meet actually obey, on Linux and macOS. Your call app sees a real USB telephony headset, so a key, your status bar, or your browser toolbar mutes the call, and muting inside the call updates all of them too.

A Zoom web call in Chrome on a Mac, with Virtual Headset's panel open under its red mic in the menu bar: Live, a Mute Call switch, the input level, and noise suppression

  • Mute that the call app respects. Zoom and Meet treat Virtual Headset's button like a headset's: they mute themselves and light its mute light back, so your key, your bar and the call app never disagree.
  • Any mic. The built-in mic, a USB mic, or Bluetooth earbuds; nothing to buy.
  • Mute from anywhere. A keyboard shortcut, your status bar or menu bar, a panel, the Firefox toolbar, or a script.
  • Bluetooth that sounds right. While you're muted, Virtual Headset lets go of the mic, so earbuds switch back from tinny hands-free audio to full stereo, and back again when you unmute.
  • Background noise removed, on your own computer. Optional DeepFilterNet 3 noise suppression runs locally on Linux and macOS, with an A/B test to hear the difference.
  • In the browser too. Chrome and other Chromium browsers talk to the headset directly; a small extension does it for Firefox.
  • Starts muted on Linux, so you're never live by accident after logging in.
  • Nix modules for NixOS, nix-darwin and Home Manager.

What you need

Part Needs
Linux PipeWire, on any distribution (NixOS module included)
macOS Nix, and the amfi_get_out_of_my_way=1 boot argument, which needs System Integrity Protection turned off; see why before you do
Your call Zoom (web or desktop) or Google Meet, in Chrome or another Chromium browser; Firefox with the extension

How it works

Your call app thinks your mic is a headset, so it obeys your mute key. Your mic and your mute key go into Virtual Headset, an ordinary USB headset made in software, with a mic and a mute button. Zoom or Meet hears you through it, and obeys your mute key

In your call app's settings, the headset shows up as two devices: Virtual_Headset_Microphone, the mic carrying your voice, and Virtual_Headset, its mute button. Zoom pairs them because their names match, and from then on treats them as one headset.

What it does

One app, everything around your mic. Around Virtual Headset, a headset made in software: Zoom and Meet (mute in sync, web or desktop); Any mic (built-in, USB or Bluetooth); Stereo while muted (for Bluetooth headsets); Nix modules (for NixOS and nix-darwin); Scriptable (CLI, D-Bus or state files); Firefox (via an extension); Noise removed (on your own computer); Mute from anywhere (a key, your bar, a panel)

Quick start

Linux, with NixOS:

{
  inputs.virtual-headset.url = "github:xav-ie/virtual-headset";

  # in your NixOS configuration
  imports = [ inputs.virtual-headset.nixosModules.default ];
  services.virtual-headset = {
    enable = true;
    user = "you";
  };
}

macOS, with nix-darwin:

{
  inputs.virtual-headset.url = "github:xav-ie/virtual-headset";

  # in your nix-darwin configuration
  imports = [ inputs.virtual-headset.darwinModules.default ];
  services.virtual-headset.enable = true;
}

Not using Nix on Linux? See installation.

Then, in your call:

  1. Choose Virtual_Headset_Microphone as your microphone.
  2. In Zoom, open Settings → Audio, turn on Sync buttons on headset, and connect Virtual_Headset when the browser asks.
  3. Press mute: virtual-headset-ctl toggle-mute on Linux, virtual-headset toggle-mute on macOS. Bind it to a key.

Mute from anywhere

Where Linux macOS
Keyboard bind virtual-headset-ctl toggle-mute bind virtual-headset toggle-mute (skhd, Raycast, …)
Your bar Waybar, i3 or Polybar any menu bar tool, e.g. SketchyBar
A panel the desktop panel, with a mic picker the settings panel
The browser the Firefox extension Chrome's own headset support
Scripts virtual-headset-ctl or D-Bus virtual-headset and its state files
Mute from anywhere, and everything agrees. Press mute anywhere (a key, your menu or status bar, the panel, the Firefox toolbar, or Zoom or Meet's own button), and Zoom or Meet mutes: it's the one place mute is decided. It then shows everywhere: your menu or status bar, the panel, the Firefox toolbar, and Zoom or Meet

Stereo while you're muted

A Bluetooth headset can't play stereo and carry your voice at the same time, so whenever an app holds its mic, it switches to mono call audio. Most call apps hold the mic for the whole meeting; Virtual Headset only while you're live:

Muted, you hear full stereo: a Bluetooth headset only drops to call audio while your mic is open, and Virtual Headset opens it only while you're live. While you're muted your mic is off and you hear full stereo. When you unmute, the mic turns on and the headset switches to call audio, which is mono, and your first word may clip while it switches. When you mute, the mic turns off, and about 2 seconds later stereo is back

On Linux the switching is WirePlumber's Bluetooth autoswitch, which is on by default (bluetooth.autoswitch-to-headset-profile); macOS does it on its own.

Documentation

Credits

License

MIT

About

A virtual HID headset device with easy integration into your bars.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages