diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-04-10 14:14:23 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-04-10 14:14:23 (GMT) |
commit | e3fe946a657b27bc0844137ecc18d77f1b81f90f (patch) | |
tree | b3a4116b9176b86de20a665fb66d2dfd05cde9dd /speech.py | |
parent | 6280b5ffeb82bf74a186ad5027c5ff4c51d8e4c4 (diff) |
Re-enable tts in text backend now Gst bindings are working - SL #3349
The code is copied from Write activity, (should be good have this solved
in the toolkit). The togglebutton api to change the icon name is fixed
too.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'speech.py')
-rw-r--r-- | speech.py | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -17,25 +17,24 @@ import logging -_logger = logging.getLogger('read-etexts-activity') +_logger = logging.getLogger('read-activity') supported = True try: - import pygst - pygst.require("0.10") from gi.repository import Gst - #Gst.ElementFactory.make('espeak', 'source') + Gst.init(None) + Gst.ElementFactory.make('espeak', None) from speech_gst import * - _logger.info('use gst-plugins-espeak') + _logger.error('use gst-plugins-espeak') except Exception, e: - _logger.info('disable gst-plugins-espeak: %s' % e) + _logger.error('disable gst-plugins-espeak: %s' % e) try: from speech_dispatcher import * - _logger.info('use speech-dispatcher') + _logger.error('use speech-dispatcher') except Exception, e: supported = False - _logger.info('disable speech: %s' % e) + _logger.error('disable speech: %s' % e) voice = 'default' pitch = 0 @@ -44,4 +43,3 @@ rate = 0 highlight_cb = None end_text_cb = None reset_cb = None -reset_buttons_cb = None |