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.

macOSsayaudiottsLow risk
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

RiskLow risk
!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

Last verified: 2026-09-17 · Category: Media

06Related solutions