Monday, May 19, 2014

Introducing tellme, a text-to-speech notifier

I've been hacking on a little tool the last couple of days and I think it's ready for others to look at it and provide suggestions to improve it. Or possibly even tell me that it already exists, in which case I'll save a lot of time. "tellme" is a simple tool that uses text-to-speech to let me know when a command finished. This is useful for commands that run for a couple of minutes - you can go off read something and the computer tells you when it's done instead of you polling every couple of seconds to check. A simple example:

tellme sudo yum update
runs yum update, and eventually says in a beautiful totally-not-computer-sounding voice "finished yum update successfully".

That was the first incarnation which was a shell script, I've started putting a few more features in (now in Python) and it now supports per-command configuration and a couple of other semi-smart things. For example:

whot@yabbi:~/xorg/xserver/Xi> tellme make
eventually says "finished xserver make successfully". With the default make configuration, it runs up the tree to search for a .git directory and then uses that as basename for the voice output. Which is useful when you rebuild all drivers simultaneously and the box tells you which ones finished and whether there was an error.

I put it up on github: It's still quite rough, but workable. Have a play with it and feel free to send me suggestions.


Donnie Berkholz said...

I did the same thing with a gui using zenity:

Peter Hutterer said...

nice. I was already thinking on how to add desktop notifications to it in case I'm not around to hear it. so far I'm leaning towards notify-send, it's less intrusive than zenity.

Russell Dickenson said...

I wrote a tip several years ago about using notify-send for long-running tasks and this was the command I gave as an example.

wget & notify-send --urgency=critical File
- download is complete.

In the article I suggested it might be useful for long downloads.

I love the idea of being informed of something via text-to-speech.