Turn text into a spoken audio file

The built-in say command reads text aloud and, with -o, saves it as an audio file; afconvert then turns that into an .m4a any phone plays. You can also pick a voice with -v.

How

Save a sentence as audio:

say -o speech.aiff "Welcome to the meeting. We start in five minutes."

Or read a whole text file:

say -o speech.aiff -f notes.txt

Convert it to a small M4A file:

afconvert -f m4af -d aac speech.aiff speech.m4a
Or just ask Titan
Read my notes aloud into an audio file I can listen to on a walk. Do it with Titan

Titan is an AI that lives on your computer: tell it what you need and it does it while you watch — you press Return, nothing runs by itself. What is Titan?

Titan isn’t on this computer yet. Get Titan, then press the button again — the task will be waiting, typed in.

Related

Get the audio out of a video