Here is a handy walk through to add an audio switcher and bind it to a key
Install switchaudio-osx
brew install switchaudio-osx
Get a list of all audio devices
/opt/homebrew/bin/SwitchAudioSource -a
Drop this script somewhere on your disk
#!/bin/sh
set -x
cmd="/opt/homebrew/bin/