KeyRoutines
StepFreeaudio.setDefaultDevice

Switch your default audio device automatically on Windows 11

Set default audio device makes a playback or recording device the one Windows uses. People run it to move sound to a headset when gaming or a call starts, and back to speakers afterwards.

How it works

  • Pick the device; by default it becomes the default for every role, and you can limit it to the regular or the communications default.
  • Devices are found by their Windows id first and then by name, so a routine from another PC, or a Bluetooth headset that comes back with a new id, still finds the right one.
  • If the device is already the default, nothing changes, and the step outputs the device that was the default before so you can switch back.
  • Apps like Discord, Teams and Zoom follow the communications default when their own device is set to Default.
  • Only one routine switches devices at a time, so two routines never fight over it.

Routines that use it

Headset when it connects

Pair Audio device changed with this step so your headset becomes the default as soon as it is plugged in or paired.

Speakers for movie night

A Hotkey routine switches to the living room speakers and then uses Set volume to bring the level up.

Call setup

Before joining a meeting, switch the communications default to your headset mic so call apps set to Default use it.

Settings

SettingWhat it does
DeviceThe playback or recording device.
RolesadvancedWhich defaults to change. Empty: all of them.

Good to know

  • Switching the default relies on a part of Windows that isn't officially documented, so it only runs on Windows builds where it is known or checked to work.
  • Apps such as Elgato Wave Link or Voicemeeter may switch the default straight back; the step notices and tells you.

Questions

How do I switch between headphones and speakers with one key?
Make a routine with a Hotkey trigger and a Set default audio device step for each device, or use a Toggle to alternate. One press then moves Windows' sound to the other device.
Will Discord switch too?
Yes, if Discord's input and output devices are set to Default, because Discord follows Windows' communications default. Discord can also be switched directly with the Discord: input device step in Pro.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.