[Sugar-devel] Problem with espeak in Read ETexts

James Simmons nicestep at gmail.com
Wed Jan 13 14:02:21 EST 2016


I haven't done any Sugar Activity coding in awhile and I just found out
that some of my Activities don't work on recent versions of Sugar. I'm
working my way through these and fixing them, and so far it hasn't been too
difficult.

However, while fixing up Read ETexts I discovered that text to speech is
disabled. There are a few lines that try to determine if the espeak
gstreamer plugin is installed, and if it is the TTS buttons are added to
the toolbar, otherwise they aren't. This is that code:

supported = True

try:
    import gst
    gst.element_factory_make('espeak')
    from speech_gst import *
    _logger.info('use gst-plugins-espeak')
except Exception, e:
    _logger.info('disable gst-plugins-espeak: %s' % e)
    try:
        from speech_dispatcher import *
        _logger.info('use speech-dispatcher')
    except Exception, e:
        supported = False
        _logger.info('disable speech: %s' % e)

This is supposed to throw an exception if the espeak gstreamer plugin is
not installed, but it is installed and I still get the exception. It looks
like the gst module exists, but its trying to do something itself that
causes the exception. "Could not import gobject" is the text in the
exception.

Other Activities like Speak are using code that looks like mine, so I don't
know what is happening.

Thoughts?

James Simmons
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160113/6a2ccd23/attachment.html>


More information about the Sugar-devel mailing list