After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 381322 - Would be nice to have a GNOME Speech driver for eSpeak.
Would be nice to have a GNOME Speech driver for eSpeak.
Status: RESOLVED FIXED
Product: gnome-speech
Classification: Deprecated
Component: drivers
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GNOME Speech Maintainer(s)
GNOME Speech Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-12-01 16:24 UTC by Rich Burridge
Modified: 2007-02-11 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch of adding in the basic infrastructure for the eSpeak driver. (30.66 KB, patch)
2006-12-01 16:29 UTC, Rich Burridge
committed Details | Review
Sample program from the eSpeak author to show how to turn text to a speech .wav file. (2.36 KB, text/plain)
2006-12-01 16:41 UTC, Rich Burridge
  Details
eSpeak driver (34.83 KB, patch)
2007-01-13 19:39 UTC, Gilles Casse
committed Details | Review
eSpeak driver (fix) (2.22 KB, patch)
2007-01-14 23:17 UTC, Gilles Casse
committed Details | Review
languages + volume (4.15 KB, patch)
2007-01-17 00:09 UTC, Gilles Casse
committed Details | Review

Description Rich Burridge 2006-12-01 16:24:22 UTC
Here's a placeholder for implementing an eSpeak driver for GNOME Speech.
Comment 1 Rich Burridge 2006-12-01 16:29:49 UTC
Created attachment 77492 [details] [review]
Patch of adding in the basic infrastructure for the eSpeak driver.
Comment 2 Rich Burridge 2006-12-01 16:41:16 UTC
Created attachment 77493 [details]
Sample program from the eSpeak author to show how to turn text to a speech .wav file.
Comment 3 Rich Burridge 2006-12-01 16:49:50 UTC
A lot of work still needs to be done on this.

The main problem is that eSpeak, unlike other TTS engines for which
there are GNOME Speech drivers, doesn't automatically send the converted
text to speech out to the audio device.

This is left as an exercise for the application that wants to use it
(in this case the GNOME speech driver for eSpeak).

As it currently stands, the eSpeak GNOME Speech driver will segv when
it attempts to call espeak_Synth().

From talking to the eSpeak author, you need to define an
espeak_SetSynthCallback(). He sent me the sample.txt example
showing how this would work.

At the point I discovered that we would still need to handle the buffers
of "wav" data returned, and send them to the audio device ourselves.

That's as far as I took it.

If somebody continues this work, they will need to do the following:

* Fixup all the code that currently is surrounded by "#ifdef FIXUP".

* Add in an espeak_SetSynthCallback() callback and send all the buffers
  of wav data to an audio device. This is not trivial, especially if we want
  to be able to interrupt it.

The best way to test this new driver is the tes-speech program in the
GNOME Speech test directory.

Comment 4 Rich Burridge 2006-12-01 17:49:02 UTC
Oh I forgot to mention. You will need to get:

eSpeak version 1.17b (or later) from:
  http://espeak.sourceforge.net/test/latest.html

Earlier versions didn't have the ability to call the C++
routines in the eSpeak library from C programs.
Jonathan has now added in the appropriate

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */    
 
...    

#ifdef __cplusplus
}
#endif /* __cplusplus */

lines (thanks!).
    
Comment 5 Gilles Casse 2007-01-13 19:35:28 UTC
See in attachment a possible eSpeak speech driver (compliant with eSpeak 1.18).
Comment 6 Gilles Casse 2007-01-13 19:39:13 UTC
Created attachment 80193 [details] [review]
eSpeak driver 

compliant with eSpeak 1.18 and gnome-speech (r266 svn)
Comment 7 Willie Walker 2007-01-13 20:39:02 UTC
Committed to gnome-speech SVN trunk and tested on Ubuntu Edgy system.  Works great.  Please pull the sources from SVN trunk, give them a shot, and let me know how it works.  This should definitely make it into GNOME 2.18.  Yeah!  Thanks very much, Gilles.
Comment 8 Gilles Casse 2007-01-14 23:17:04 UTC
Created attachment 80280 [details] [review]
eSpeak driver (fix)

Patch compliant with gnome-speech (r267) and eSpeak 1.18.

* The default include directory is /usr/include/espeak. 
* The selected voice is now taken in account!
Comment 9 Willie Walker 2007-01-15 02:32:26 UTC
Committed.  Thanks!
Comment 10 Gilles Casse 2007-01-17 00:09:59 UTC
Created attachment 80462 [details] [review]
languages + volume

Patch compliant with r268 + eSpeak 1.18

Thanks to Jonathan Duddington for his re-reading and notices.

* Max volume value = 200 (instead of 100).
* Correct language name.
* The first element of the voice list matches if possible the LANGUAGE variable (environment); otherwise the English language is the first element.
Comment 11 Willie Walker 2007-01-17 02:52:49 UTC
Committed.  Thanks!  I'm also taking care to mark the previous patches as committed and not obsolete.  They each have been committed and the new patches build on, rather than obsolete, the previous patches.  Thanks again for your hard work!  
Comment 12 Willie Walker 2007-02-11 14:48:26 UTC
This driver has been in use for a while.  Closing this as fixed.  Thanks!