Switch the default audio device
hs_audio_set_deviceSwitch the system default audio device to a specified output or input, using exact name match or substring fallback, and list available devices when no match is found.
Instructions
Make an audio device the system default, for example switching output to headphones or a display. Matches the name exactly first, then falls back to a case-insensitive substring, and lists the available devices when nothing matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device name from hs_audio_devices. A substring is accepted. | |
| direction | No | Which default to change. Output is speakers and headphones, input is microphones. | output |