I am using a MacOS X server (to which I only have command-line access) to convert text to speech which is saved to sound files (using PyObjC). I would like to install some of the optional OS X voices (for example com.apple.speech.synthesis.voice.tom.premium
) but I need to be able to do this through the command-line rather than via the System Preferences. Does anyone know a way to do this?
-
Why can't you use Sys Prefs?– Arc676Nov 8, 2015 at 11:48
-
1I need to do this as part of a Travis (travis-ci.org) job, and therefore this ideally all has to be done via the command-line.– astrofrogNov 8, 2015 at 12:49
1 Answer
You can predownload the voice files to your App/Python package (or however you are distributing your app), and then write a script to move or copy the voice files to this folder:
/System/Library/Speech/Voices/
So:
- Download the voice files on your development machine
- Wrap them inside an
assets
folder or something like this- Part of your Travis script can be to move the files first in the Voices folder on the mac
- And after that, you run your tests/other scripts