diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-10-24 12:08:35 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-10-24 12:21:20 (GMT) |
commit | f26a04fc580bcf7dc4118bcbf1358e9f56a27b33 (patch) | |
tree | 083900fdb8392dc5cb988b0f2ed4748db861d214 /speech.py | |
parent | b98e1e9589e1fe8378b52372ded165eebdf16c92 (diff) |
Finish port of tts functionality to gtk3 and gst 1.0 - SL #4057
This patch solves SL #3705 too (tts button placement in the toolbar)
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'speech.py')
-rw-r--r-- | speech.py | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -21,19 +21,20 @@ _logger = logging.getLogger('write-activity') 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) +try: + from gi.repository import Gst + Gst.init(None) + Gst.ElementFactory.make('espeak', None) + from speech_gst import * + _logger.error('use gst-plugins-espeak') +except Exception, e: + _logger.error('disable gst-plugins-espeak: %s' % e) + try: + from speech_dispatcher import * + _logger.error('use speech-dispatcher') + except Exception, e: + supported = False + _logger.error('disable speech: %s' % e) voice = 'default' pitch = 0 |