0

I would like to change the default voice via terminal. Is there a better (and less repetitive way) to change the default voice than say -v 'Alex' 'Hello world'. I really do not want to go into my program and change all my os.system("say 'Foo'") as I have many. I am using Mac OS x High Sierra Version 10.13.3. I am making the program that I mention in python. If you need any more info, comment. Thank you in advance,

user 9311010

user9311010
  • 79
  • 11
  • 1
    You could put a wrapper around the `say` command that uses your chosen voice, like this https://stackoverflow.com/a/24202568/2836621 – Mark Setchell Feb 21 '18 at 18:33
  • Or you could run `os.system("echo $PATH")` (just once to test) and see if there is any directory ahead of `/usr/bin` (where the real `say` lives) in the PATH and add a new script to that directory because it will get executed in preference to the standard one if it is to the left on the PATH. – Mark Setchell Feb 21 '18 at 19:29
  • Or you could do `export PYTHONPATH=$HOME/overrides` in your login profile, and create a script called `$HOME/overrides/say` which just does `/usr/bin/say -v Tessa "$@"` – Mark Setchell Feb 21 '18 at 20:16

0 Answers0