Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/speech.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-03-09 00:22:18 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-03-09 00:22:18 (GMT)
commitdff5fae7bd71d477e93c5c344e6de35178c68982 (patch)
tree47c0c062e5d469c3abfa3b5dc7f0fe0a38f8dbdc /speech.py
parent18296c8d83f9ae63c7aaf0128f091da896c1e2f7 (diff)
Run readetexts with isolated speech-dispatcher
Diffstat (limited to 'speech.py')
-rw-r--r--speech.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/speech.py b/speech.py
index 72fc5b9..ff30975 100644
--- a/speech.py
+++ b/speech.py
@@ -14,21 +14,27 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
+
+logger = logging.getLogger('readetexts')
+
supported = True
done = True
-highlight_cb = None
-reset_cb = None
-voice = None
-pitch = None
-rate = None
-
try:
import gst
gst.element_factory_make('espeak')
- from speech-gst import *
+ from speech_gst import *
+ logger.info('use gst-plugins-espeak')
except:
try:
- from speech-dispatcher import *
- except:
+ from speech_dispatcher import *
+ logger.info('use speech-dispatcher')
+ except Exception, e:
supported = False
+ logger.info('disable speech: %s' % e)
+
+voice = None
+pitch = PITCH_DEFAULT
+rate = RATE_DEFAULT
+