Speak typed keystrokes/letters on Mac
You can achieve this by temporarily enabling VoiceOver.


Open System Preferences > Accessibility > VoiceOver and tick the checkbox to enable VoiceOver.
In the dialog that appears, click "Use VoiceOver".
Click on the text field where you would like to input data, and begin to type.


Each keystroke you press will be spoken aloud by default.

When you're done, simply uncheck the VoiceOver checkbox in System Preferences. VoiceOver can also be toggled with the  ⌘F5 shortcut.