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$
More Posts related to MacOS,
- How to find files taking up space on your Mac
- How to open new tabs macOS Terminal
- Encode or Decode Base64 String using Mac Terminal Command
- How to take a screenshot on a Mac? (updated for macOS Monterey 2022)
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to know your Mac Screen Resolution?
- How to make macOS Terminal window Transparent (or Opaque)
- [macOS] Change homepage Macbook Safari Browser
- Cut, Copy and Paste keyboard commands on mac
- Shutdown Mac Terminal Command
- Zsh Shell: Custom alias that you may find useful
- How to uninstall GarageBand from Mac
- How to Refresh Mac Desktop
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Right Click on Mac Desktop?
- How to remove app from Dock when closed [macOS Big Sur]
- How to display directory tree in Mac Terminal
- [Eclipse] Locate Preferences in macOS
- How to save webpage as pdf using macOS Safari
- Set Python 3.8 as a default python version on macOS
- 10 Beginners Commands for macOS Terminal Usage
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- [Solution] macOS Big Sur Installation: There is not enough free space, Additional Space Required
- How to search (find) in macOS Terminal Console Text
- How to come out of dquote prompt in Terminal - macOS/Linux
- Test internet speed using macOS Terminal command - MacOS
- Add Custom header and footer to Windows Notepad file - NotepadPlusPlus
- Find the location of Spotlight searched file - Mac-OS-X
- Emulator: Warning: restoring GLES1 context from snapshot. App may need reloading. - Android-Studio
- Cannot open or preview pdf with view only and restricted download access in Microsoft Teams - Teams