How to Use the say Command in macOS Terminal to Convert Text to Speech and Audio Files

Every version of macOS includes a powerful, native speech synthesis engine that works straight out of the box without requiring third-party software or internet connectivity. Accessible via the command line through the say utility, this tool allows Mac users and developers to convert typed words or entire text documents into spoken audio. Whether you want to build automated voice notifications for long-running compile tasks or export custom voiceovers into audio files, the say command offers remarkable flexibility.

Basic Syntax and Immediate Speech Playback

The simplest way to use the command is by passing a string enclosed in quotation marks directly to Terminal:

say "Task execution has commenced."

Upon pressing Enter, macOS immediately synthesises the text using your current default system voice and plays it through your active audio output device. You can also pipe output from other command-line utilities directly into say:

echo "Your disk backup is complete." | say

Reading Long Documents from Text Files

If you have an article, script, or technical log saved as a plain text file, you can instruct macOS to read the entire file aloud using the -f (file) flag:

say -f notes.txt

This is particularly beneficial for proofreading long-form prose, as hearing your text spoken aloud makes grammatical awkwardness, repeated words, and typos immediately apparent.

Inspecting and Selecting Different Voices

macOS ships with a diverse collection of voices representing different accents, genders, and international languages. To view all available voices installed on your Mac, use the -v flag followed by a question mark:

say -v '?'

This command prints an itemised list detailing each voice name, language locale (e.g., en_GB for British English, en_US for American English, en_AU for Australian English), and a brief sample sentence.

To speak using a specific installed voice, provide its name after the -v argument:

say -v Daniel "Good morning. All scheduled maintenance tasks are up to date."
say -v Samantha "System check complete."

Adjusting Speech Rate (Words Per Minute)

By default, macOS speaks at a moderate pace (typically around 175 to 200 words per minute depending on the selected voice). You can fine-tune the playback speed using the -r (rate) parameter:

  • Slower Paced Speech: To slow down pronunciation for clarity or language learning:
    say -r 140 "Please listen carefully to the following instructions."
  • Accelerated Speech: To rapidly review lengthy logs or draft documents:
    say -r 260 "Processing log lines at elevated reading speed."

Exporting Speech Directly to Audio Files

Beyond live speaker output, the say command can render spoken dialogue directly into uncompressed audio files using the -o (output) flag:

say -v Oliver -o announcement.aiff "Welcome to the digital innovation workshop."

By default, macOS outputs high-quality AIFF files. If you require standard AAC/M4A format for wider mobile compatibility or smaller file sizes, you can specify the target format directly or convert it using the built-in afconvert tool:

say -o message.m4a --data-format=aac "Exporting spoken audio directly to AAC format."

Integrating Voice Alerts into Developer Workflows

One of the most practical applications of the say utility is chaining it to build pipelines, backup scripts, or lengthy data imports. When executing a command that takes several minutes, you can append a spoken notification so you know immediately when the task concludes without constantly monitoring the Terminal window:

npm run build && say -v Daniel "Build succeeded without warnings" || say -v Daniel "Build failed with errors"

Similarly, in a Bash or Zsh script, you can capture execution timing and announce milestones:

tar -czf project-archive.tar.gz ./large_project && say "Archive compression finished."

Downloading High-Quality and Enhanced Voices

Apple includes lightweight, standard-quality voices by default to save storage space. However, you can download premium “Enhanced” and “Siri” quality neural voices for dramatically more natural intonation:

  1. Open System Settings on your Mac.
  2. Navigate to Accessibility > Spoken Content.
  3. Click the System Voice dropdown menu and select Manage Voices…
  4. Locate your preferred language and dialect (e.g., English (United Kingdom)).
  5. Select the Enhanced or Premium variant of voices such as Daniel, Serena, or Stephanie, and click the cloud download icon.
  6. Once downloaded, the enhanced models are automatically utilised by the say command in Terminal.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.