Using AppleScript to activate the "Choose which speakers to use" button in iTunes

Once the menu is active, you can use the arrow keys to navigate up and down, and return to select a given speaker. This allows you to tell iTunes to control a Homepod or other AirPlay 2 speaker from the keyboard.

Unfortunately there is no way I can find to automatically select a specific speaker – you have to manually do it with the arrow keys.