Export Text-to-Speech to an Audio File with say -o
Beyond reading text aloud, the say command can write synthesized speech to AIFF or M4A files with -o.
Run `say -o output.aiff "your text"` to save the spoken text as an audio file, or add `--data-format=alac` with an .m4a name.
01Command
Command
$ say -o announcement.aiff "Deployment finished." && say -o voice-memo.m4a --data-format=alac "Hello from macOS."02What it does
Most people only use say to read text aloud, but -o renders the same speech to disk, which is handy for podcast intros, accessibility assets, or voice notes. The default output is AIFF; appending .m4a with --data-format=alac gives a compressed file. You can combine -o with -v to choose a specific system voice, and -r to control speaking rate. Long scripts can be piped in: `cat notes.txt | say -o notes.aiff`.
03Risk
!Warning: Only voices installed on the system can be exported — check available voices with `say -v ?`.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- say(1) — macOS man pageEvidence: say -o out.aiffile writes synthesized speech to an AIFF file; --data-format selects the audio format.
- say — speak text or write to an audio file (macOS man page)Evidence: Documents say -o outfile (writes AIFF by default) and --data-format for other formats such as alac/m4a.
Last verified: 2026-09-17 · Category: Media