Programmatically launch the Mac's System Preferences screen -> Sound
There is an easier way:
NSURL * url = [NSURL fileURLWithPath:@"/System/Library/PreferencePanes/Speech.prefPane"];
[[NSWorkspace sharedWorkspace] openURL:url];
You can applescript it:
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.sound"
reveal anchor "Output" of pane id "com.apple.preference.sound"
end tell
Adapted from this link.