Read Text to Speech in Terminal


Here's a way to read text to speech in terminal.

Install tool

There's a small, OSS speech synthesizer, CMU Flite, which you can get for free:

sudo apt install flite

Give it text

Now you can give it some speech to read:

flite -t "Hi"

Or something more substantial in a file:

flite < input.txt

And I you can change the voice:

flite -voice slt < input.txt