Parth KabraMac

How To Use The Say Command

May 2021 · Using the built-in MacOS say command, and customizing the voice

Links: Say man page, Default speaking rate of speech synthesis program, Mac say command to mp3

To have your computer speak to you open your terminal and enter:

say "Your Text Here"

Customizing the voice

Pass in --voice (or -v). For example:

say "Jelly" -v "Albert"

To list out all voices, use

say -v '?'

Reading from a file

Use the --input-file (-f) to specify the file to read from.

Say you have this file, say.txt:

We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
You wouldn't get this from any other guy

Have your computer sing with

say -f song.text

You an also use the pipe operator: cat song.text | say.

Rate

Use --rate (-r) to control the rate in words per minute of the sound.

For example,

say "I am in a rush!" -r 500

Saving as mp4 or aiff

Pass in the --output-file (-o) to pass an output file. For example:

say "Happy birthday!" -o birthday.mp3

Note that some audios may not support one of the formats.