prints the name of a randomly-choosen text-to-speech voice on a macOS system
Running the program without arguments will acquire a list of available voices and print a random selection from that list:
$ ./randvoice.py
Jorge
This is the interactive help text generated by the program:
usage: randvoice.py [-h] [--include-novelty] [--only-novelty] [--speak-sample] [--lang LANG] [--cc CC] [--list-voices]
[--verbose]
Print a randomly-chosen name from the system's available text-to-speech voice
optional arguments:
-h, --help show this help message and exit
--include-novelty include the set of novelty voices
--only-novelty only choose from the novelty voice set
--speak-sample speak the sample that corresponds with the selected voice
--lang LANG limit the voice selection to the given language
--cc CC limit the voice selection to the given country codes
--list-voices instead of printing a random voice, print the list of (optionally-filtered) voices
--verbose print additional detail
This is an example of using filters:
$ ./randvoice.py --include-novelty --lang en
Pipe Organ
The list of voices provided by the system is printed by the --list-voices
option.
$ ./randvoice.py --list-voices
Agnes
Alex
Alice
Alva
Amelie
[...]
If you add --verbose
to that option, you get a table with some more information applicable to filtering.
$ ./randvoice.py --list-voices --verbose
voice lang cc novelty sample
---------- ---- -------- ------- ----------------------------------------------------------
Agnes en US False Isn't it nice to have a computer that will talk to you?
Alex en US False Most people recognize me by my voice.
Alice it IT False Salve, mi chiamo Alice e sono una voce italiana.
Alva sv SE False Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr CA False Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de DE False Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bruce en US False I sure like being inside this fancy computer
Carmit he IL False שלום. קוראים לי כרמית, ואני קול בשפה העברית.
Claire nl NL False Hallo, mijn naam is Claire. Ik ben een Nederlandse stem.
Damayanti id ID False Halo, nama saya Damayanti. Saya berbahasa Indonesia.
[...]