Use macOS accessibility features in Terminal
You can use VoiceOver to speak text that appears in a Terminal window. Before you can use VoiceOver, you must turn it on in Accessibility preferences. Choose Apple menu > System Preferences, click Accessibility, then click VoiceOver.
Open the VoiceOver pane for me
Here are some ways you can use VoiceOver with Terminal:
To control VoiceOver and move the VoiceOver cursor, hold down the Control and Option keys as you press the arrow keys or other keys. You can show or hide the VoiceOver cursor. Showing it allows others working with you to more closely collaborate with you as you work.
Your keyboard and mouse work with the VoiceOver cursor in a variety of ways. You can configure the cursors so that they follow each other, or use them separately, in different apps at the same time.
You can customize VoiceOver to fit your needs. While VoiceOver is on, press Control-Option-F8 to open the VoiceOver Utility window, then choose your preferred settings.
For more information about using VoiceOver, go to the Apple Accessibility website.