Let your Linux terminal speak its mind

Let your Linux terminal speak its mind

eSpeak is an open source text-to-speech synthesizer that can be invoked from the Linux command line.

Linux toy: cava
Image credits : 

Jason Baker

x

Get the newsletter

Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.

Greetings from another day in our 24-day-long Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what a command-line toy even is. We’re figuring that out as we go, but generally, it could be a game, or any simple diversion that helps you have fun at the terminal.

We hope that even if you've seen some of these before, there will be something new for everybody in our series.

Some of you may be too young to remember, but before there was Alexa, Siri, or the Google Assistant, computers still had voices.

Many of us will never forget HAL 9000 from 2001: A Space Odessey helpfully conversing with the crew (sorry, Dave). But between 1960s science fiction and today, there was a whole generation of speaking computers. Some of them great, most of them, not so great.

One of my favorites is the open source project eSpeak. It's available in many forms, including a library version you can use to include speech technology in your own project, but it also coms as a command-line program that you can install and use easily. In my distribution, this was as simple as:

$ sudo dnf install espeak

Invoking eSpeak then can be invoked either interactively, or by piping text to it using the output of another program or a simple echo command. There are a number of voice files available for eSpeak, and if you're especially bored over the holidays, you could even create your own.

A fork of eSpeak called eSpeak NG ("Next Generation") was created in 2015 from some developers who wanted to continue development of the otherwise lightly-updated eSpeak. eSpeak is made available as open source under a GPL version 3 license, and you can find out more about the project and download the source code on SourceForge.

I'll also throw in a bonus toy today, cava. Because I've been eager to give each of these articles a unique screenshot as the lead image, and today's toy outputs sound rather than something visual, I needed to find something to fill the space. Short for "console-based audio visualizer for ALSA" (although it supports more than just ALSA now), cava is a nice MIT-licensed terminal audio visualization tool that's fun to watch. Below, is a visualization of eSpeak's output of the following:

$ echo "Rudolph, the red-nosed reindeer, had a very shiny nose." | espeak

Do you have a favorite command-line toy that you we should have included? Our calendar is basically set for the remainder of the series, but we'd still love to feature some cool command-line toys in the new year. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement.

Be sure to check out yesterday's toy, Solve a puzzle at the Linux command line with nudoku, and come back tomorrow for another!

Linux toy: Nudoku

Sudokus are simple logic games that can be enjoyed just about anywhere, including in your Linux terminal.

About the author

Jason Baker - I use technology to make the world more open. Linux desktop enthusiast. Map/geospatial nerd. Raspberry Pi tinkerer. Data analysis and visualization geek. Occasional coder. Cloud nativist. Civic tech and open government booster.