macOS: Text to Speech Command - say examples


If you want to covert text to speech on your macOS Terminal you can make use of say command,

Syntax:
say [-v voice] [-f file | string ...]


Example 1: Text to speech using string
% say "Hello therehow are you?"


Example 2: Text to speech using string and a female voice Alice
% say -v Alice "Hello, my name is Alice!"


Example 3: Text to speech using text from file and a female voice Alice
% say -v Alice -f my-speech-text.txt
bash-3.2$ echo "This message has been read from an external file" > my-speech-text.txt
bash-3.2$ say -v Alice -f my-speech-text.txt
bash-3.2$ 
macOS Terminal read text to speech from external file

Top Hashtags:

Advertisements

Advertisements




Advertisements