osx speech questions

Hi, I have some quiestions about the osx speech syntesis on osx.
I would like to :

  • populate a popupmenu with the downloaded voices, filtered by languages, so the user can choose which one he/she wants to hear
  • download / install available voices via terminal, so the user dont have to navigate to the system preferences.
  • there is a sample for each voice actors, but i cant find them, is it possible to listen them before downloading? so the user can choose which he/she likes/understands the most
    I tried the “say -v ?” command, but this lists all the available voice actors.

You may want to read about APIs on Apple website:
https://developer.apple.com/reference/appkit/nsspeechsynthesizer

and for MBS Plugin Implementation for Xojo:
http://www.monkeybreadsoftware.net/class-nsspeechsynthesizermbs.shtml