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 18:20:54 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-03-09 18:20:54 (GMT)
commit6ff15a68c4aca2cbc311ac80070c3930145f8e9e (patch)
tree689eedd12181ad3c080c4fa8399429e84ba616e5 /speech.py
parent05899840483e1911b4e90180b3978c159a8cd00f (diff)
Support gst-plugins-espeak
Diffstat (limited to 'speech.py')
-rw-r--r--speech.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/speech.py b/speech.py
index e7793f4..11ff045 100644
--- a/speech.py
+++ b/speech.py
@@ -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