I am aware of the
afplay command to play an audio file. When I do that it plays through the current selected Sound Output. If I have my headphones in, it plays on the headphones. How can I specify that the sound plays over the Built-In Speakers?
In the Sounds System Preferences you can select the Alerts tab and direct the output of the Alert to a specific output. I am looking to do the same but with my own customs sounds triggered by the command line.