Skip to content

say MacOS Command Guide

The MacOS “say” command allows users to convert text into speech, providing a convenient way to listen to text content. This built-in feature offers various customization options, such as selecting different voices, adjusting speech rate, and even saving speech output to a file. The “say” command can be used in scripts, accessibility settings, or simply for fun. It is a versatile tool that enhances the user experience by providing a seamless text-to-speech functionality.

say Syntax:

Terminal window
say [options] [text]

Options:

OptionDescription
-vSpecify voice to use
-rSpecify speech rate (words per minute)
-oSave spoken text to an audio file
-fRead text from file
-nDo not print warning messages
-hDisplay help message

Parameters:

ParameterDescription
textText to be spoken out loud
voiceName of the voice to use
speech rateNumber of words that should be spoken per minute
audio fileFile path where the audio output should be saved
filePath to the file containing text to be spoken

say Command Samples:

Basic Text-to-Speech

Terminal window
say "Hello, World!"

Initiates text-to-speech to say the phrase “Hello, World!” out loud.

Output Text File Content

Terminal window
say -f myfile.txt

Reads the content of the text file “myfile.txt” aloud using text-to-speech.

Adjusting Speech Rate

Terminal window
say -r 200 "This is a fast spoken text."

Changes the speech rate to 200 words per minute while saying the provided text.

Set Custom Voice

Terminal window
say -v Alex "Welcome to the world of MacOS."

Utilizes the voice “Alex” to speak the phrase “Welcome to the world of MacOS” using text-to-speech.

Add Pauses

Terminal window
say "I will pause... for a moment." "I have resumed."

Adds a brief pause between the two provided phrases during text-to-speech output.

Announce Time

Terminal window
say -v Samantha "The current time is $(date +%r)"

Uses the voice “Samantha” to announce the current time in the format: Hour:Minutes:Seconds AM/PM.

Repeat Itself

Terminal window
say "Repeat after me." "Repeat after me." "Repeat after me."

Repeats the phrase “Repeat after me.” three times using text-to-speech.

How do I use say in MacOS?

To use the say command in MacOS, execute the following command:

Terminal window
say "Hello, World!"

What are some common options with the say command in MacOS?

Some common options with the say command in MacOS include choosing the voice, setting the speech rate, and saving the output to a file.

Terminal window
say -v Samantha "Would you like to play a game?"

How can I make the say command in MacOS speak faster?

To make the say command speak faster in MacOS, you can adjust the speech rate using the -r flag.

Terminal window
say -r 300 "I speak really fast!"

Can I choose a specific voice with the say command in MacOS?

Yes, you can choose a specific voice with the say command in MacOS using the -v flag.

Terminal window
say -v Alex "The weather today is sunny."

How do I save the output of the say command in MacOS to a file?

You can save the output of the say command to a file in MacOS using the -o flag followed by the file path.

Terminal window
say -o output.txt "Saving this text to a file."

Is there a way to make the say command in MacOS repeat the spoken text?

Yes, you can make the say command repeat the spoken text by using the --interactive flag.

Terminal window
say --interactive "Repeat after me."

Applications of the say command

  • Creating audio alerts
  • Generating spoken feedback in scripts or automated processes
  • Assisting users with visual impairments
  • Creating audio reminders
  • Adding voice output to applications or interfaces