Introducing espeak-gui
I’m joining the hype of presenting little new projects there seems to be those days, unleashing the first version of espeak-gui, a graphical interface to let the computer read out text.
Why, when, who?
The project started almost a year ago when, out of curiosity on what writing Python bindings for C/C++ libraries is like, I started python-espeak, bindings for the espeak speech synthesizer (which, by the way, comes installed by default on Ubuntu and many other distributions).
It turned out that writing bindings isn’t as funny as I thought so they haven’t advanced much since then, but the basic functionality was there and I felt the need for some application using those bindings, so that’s how I started espeak-gui.
Some months later, in true Free Software spirit, someone else -interested in an application like this for personal usage- found my code on Launchpad and got in touch with me, providing me with quite some nice patches. Thank you, Joe Burmeister! However, I didn’t do any more work on it, as I’ve been busy with other projects (eg. Zeitgeist), and development stalled there.
Now, another half a year later, I’ve finally got back to this and decided it’s time I push it out into the wild. So, after cleaning it up a bit more and implementing some new feature, here you have espeak-gui!
(The bindings aren’t really encouraged for widespread usage at this point and I’ll probably end up rewriting them using SWIG or something else; however, if you’re interested in using them please get in touch with me).
Where do I get it?
If you’re using Ubuntu or Debian, you can find a packages for python-espeak and espeak-gui in my PPA.
For users of other distributions, you can install them manually after installing the needed dependencies (most importantly, libespeak-dev).
For the Python bindings for espeak:
$ bzr get lp:python-espeak $ cd python-espeak $ python setup.py build # python setup.py install
And for the GUI:
$ wget -c http://launchpad.net/espeak-gui/trunk/0.1/+download/espeak-gui-0.1.tar.gz $ tar -xzvf espeak-gui-0.1.tar.gz $ cd espeak-gui-0.1 # python setup.py install
[Update: A new version is out, see espeak-gui 0.2 for details.]
I have several ideas on how to continue improving it and I think I’ll slowly continue doing so (or maybe not so slowly if I get positive feedback on this :)). Also, patches are always welcome!
Using it
Once installed, you’ll find espeak-gui under Applications -> Sound and Video (maybe Accessibility would be a better place?), or you can run it from the command line like this:
espeak [ <file 1> <file 2> ... ]
Related posts:
- espeak-gui 0.2 Yesterday I did a first release of espeak-gui, so while I’m still in practice I’ve decided to get out a...
- GNOME Activity Journal, and installing it on Ubuntu As already announced by Seif, the first development release of the GNOME Activity Journal (what was formerly known as GNOME...
- Introduction to Zeitgeist 0.2’s API So now that Zeitgeist 0.2.0 is out I’ve thought I’d write down some examples of how to use it’s API...
- Zeitgeist since UDS Quite some stuff has been going on in Zeitgeist since UDS, including the addition of two new developers to our...
Hey,
appreciate your work. What about calling it something not that technical? Like “Read”, “Reader” .. :D
Hey – great idea! Do you think it would be possible to integrate this into evolution and get espeak to read out new emails etc? I looked into this a while ago but I couldn’t seem to find any utilites which would do this. Keep up the good work!
Thanks for your feedback!
@ Rabe:
At the moment I’m happy with “espeak-gui” (it’s simple and says exactly what it is, a GUI for eSpeak), though I may consider renaming it to something else, so any suggestions are welcome.
However, I’d like to keep the name something unique, for Google karma, so I won’t name it “Reader” or anything else like that.
In regards to keeping it understandable, that’s a good point, but only up to a certain degree as non-technical users shouldn’t really need to worry about the name (I suppose I should improve the Debian package’s description to explain what it does in plain terms, though).
@ Matt:
Writing a plugin for that shouldn’t be too difficult, but I don’t use Evolution so you’ll have to look for someone else to work on it :).
Unfortunately it does not work:
lgb@oxygene:/tmp/x/espeak-gui-0.1$ sudo python setup.py install
running install
Traceback (most recent call last):
File “setup.py”, line 60, in
‘Environment :: X11 Applications :: GTK’,
File “/usr/lib/python2.6/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.6/distutils/dist.py”, line 975, in run_commands
self.run_command(cmd)
File “/usr/lib/python2.6/distutils/dist.py”, line 995, in run_command
cmd_obj.run()
File “setup.py”, line 24, in run
self._destdir = os.path.join(self.root, self.prefix.strip(‘/’))
File “/usr/lib/python2.6/posixpath.py”, line 67, in join
elif path == ” or path.endswith(‘/’):
AttributeError: ‘NoneType’ object has no attribute ‘endswith’
@ LGB:
Try changing in setup.py the line:
self._destdir = os.path.join(self.root, self.prefix.strip(‘/’))
to the following:
self._destdir = os.path.join(self.root, self.prefix.strip(‘/’) if self.prefix else ‘usr’)
If that works I’ll commit the fix. Can you also try whether running “sudo python setup.py install –prefix=/usr” (without doing the above change) works?
Thanks!
This software seems rather advanced.
http://code.google.com/p/gespeaker/
None of your suggestion fixed the problem :(
Can it be a problem because of python 2.6? Just guessing.
@ FabriceV:
Thanks for letting me know about it!
Most of the features espeak-gui doesn’t have were already planned and should be straightforward to implement. The only one which has me curious is the “mbrola voices” support, I’ll have to look into that! Maybe I’ll be even able to borrow some code from there, as Gespeaker is also using Python and a compatible license.
(On a technical side, espeak-gui has the advantage that it uses libespeak instead of calling the “espeak” binary in a subprocess, so it’s doing it the proper way, but I guess for end-users this difference isn’t really noticeable.)
@ LGB:
I don’t know what the problem could be then :/.
But well, if you’ve got python-espeak installed you can run espeak-gui right there, without needing to install it; just run “./espeak-gui” inside its source directory.
You can also install it semi-manually, by deleting the “cmdclass = {‘install’: _install},” line from the setup.py, installing it, and then creating the missing symlinks manually:
sudo ln -s /usr/share/espeak-gui/espeak-gui /usr/bin/espeak-gui
sudo ln -s /usr/share/espeak-gui/data/espeak-gui.png /usr/share/pixmaps/espeak-gui.png
Or even better, if you’re on a Debian-based system use the .deb packages from my PPA, those work :).
[...] Introducing espeak-gui [...]
@ LGB:
Oh, looking at it again I think I’ve found the problem. Please try changing the line:
self._destdir = os.path.join(self.root, self.prefix.strip(‘/’))
To:
self._destdir = self.prefix
I’ve got out an update tarball with a couple fixes and support for translating the interface. See http://bloc.eurion.net/archives/2010/espeak-gui-0-2/.
@ LGB: I’ve also applied a fix to setup.py similar to the last one I’ve proposed, I hope it works!
I agree espeak-gui is too geek… and it’s a gui, – mainly for not geeks! What about, Read, Parole, Verbum, Paraula, Wort, Vocabulo, ParlaLinux, LinuxSpeak, … ?
[...] I did a first release of espeak-gui, so while I’m still in practice I’ve decided to get out a second [...]
For me, what this project has that gespeaker hasn’t and should, is highlighting words as it reads them, and auto scrolling to keep the highlighted words in view. For me that is one of the most important things reading software should do!