Provided you have granted Script Editor access under Accessibility, this snippet will let you set a system voice. Edit Moira (Enhanced)
to your preference.
tell application "System Settings"
activate
-- set moira as the system voice
delay 1
reveal anchor "AX_SPOKEN_VOICE" of pane id "com.apple.Accessibility-Settings.extension"
delay 1
tell application "System Events"
click pop up button 2 of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Spoken Content" of application process "System Settings"
delay 0.75
click menu item "Moira (Enhanced)" of menu 1 of pop up button 2 of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Spoken Content" of application process "System Settings"
end tell
close
end tell