A fun article today on how to use OSX speech command with the command line.
You can have your system say a sentence by using:
$ say Hello World. My Name is Jonathan.
Your mac ships with a few voices, use
-v to specify a voice.
$ say -v Karen Hello World
List of voices: Alex, Bruce, Fred, Kathy, Vicky, Victoria, Daniel, Tessa, Fiona, Moira, Veena, Karen.
You can use
-f to specify the path to a file to read.
$ say -f ~/testvoice.txt
You can also pipe the content of the file into the
$ cat ~/testvoice.txt | say
If are looking for text to fill in your text file, checkout http://fucklorem.com/.
-o flag to output the
say -o /Users/klugjo/outputvoice.m4a Hello World
$ say -v Fiona -f ~/testvoice.txt -o outputvoice.m4a
Hope you had fun, not the most useful command but I had quite a bit of fun with it.
Check out more OS X commands here.