Any way to switch the Audio Output on Mac between Macbook Pro Speakers and Bluetooth Headset?

Hello folks,

Unfortunately, I could not find a way to automate switching different audio sources on my Mac. Does anybody know, if there is a way to switch the Audio Output on Mac between Macbook Pro Speakers and Bluetooth Headset with BetterTouchTool?

Thanks a lot! :pray:t3:


This Thread might be useful !

Been trying to make it work myself with Audio Input too, But I got to many errors and still doesn't work as expected...
Let me know if you find a solution !

1 Like

Thanks a lot @Brahim ! Did you already talk to @digisam ? Cause maybe he updated his script for the latest Mac OS... Thx Sam for a quick update! :pray:t3:

Sure thing !
I haven't contacted him.
Can you share the updated script here ? @tvls1

It works fine for me in Ventura. What errors are you getting?

1 Like


Testing the script in the Shortcuts App

My output devices

1 Like

Thanks for sharing your problem, I have the same!

In terminal what happens when you run:

/opt/homebrew/bin/switchaudiosource -a

if it lists the audio devices try to see if you are able to cycle through the devices using:

/opt/homebrew/bin/switchaudiosource -n

If that is all working then try to switch to device by name

/opt/homebrew/bin/switchaudiosource -s "Name of Device"

I just tried it with Shortcuts and it worked fine

Double check the apostrophe used for Brahim ' s i noticed on my mac in some cases it says Sam's and in others Sam’s, so it might be using a smart quote rather than a straight quote. Easiest way to check is copy paste from the list of devices you get from the first terminal command above.

Good luck

1 Like

Thanks a lot Sam!!

All is working, So I guess it's a name

For My needs

/opt/homebrew/bin/switchaudiosource -n

Works Amazing!

I will use it in a shell script, and I'll recheck the name to get it to work just for fun.

Thank again !

1 Like

Hello guys!

Can this be used to Mute / Unmute the Microphone? with a little script