diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-03-09 18:20:54 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-03-09 18:20:54 (GMT) |
commit | 6ff15a68c4aca2cbc311ac80070c3930145f8e9e (patch) | |
tree | 689eedd12181ad3c080c4fa8399429e84ba616e5 /speech.py | |
parent | 05899840483e1911b4e90180b3978c159a8cd00f (diff) |
Support gst-plugins-espeak
Diffstat (limited to 'speech.py')
-rw-r--r-- | speech.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,4 +1,5 @@ # Copyright (C) 2008 James D. Simmons +# Copyright (C) 2009 Aleksey S. Lim # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,12 +21,17 @@ _logger = logging.getLogger('read-etexts-activity') supported = True +import gst +gst.element_factory_make('espeak') +from speech_gst import * + try: import gst gst.element_factory_make('espeak') from speech_gst import * _logger.info('use gst-plugins-espeak') -except: +except Exception, e: + _logger.info('disable gst-plugins-espeak: %s' % e) try: from speech_dispatcher import * _logger.info('use speech-dispatcher') @@ -34,8 +40,8 @@ except: _logger.info('disable speech: %s' % e) voice = None -pitch = PITCH_DEFAULT -rate = RATE_DEFAULT +pitch = 0 +rate = 0 highlight_cb = None reset_cb = None |