Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/speech.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-04-10 14:14:23 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-04-10 14:14:23 (GMT)
commite3fe946a657b27bc0844137ecc18d77f1b81f90f (patch)
treeb3a4116b9176b86de20a665fb66d2dfd05cde9dd /speech.py
parent6280b5ffeb82bf74a186ad5027c5ff4c51d8e4c4 (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.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/speech.py b/speech.py
index bda15f0..a9b2f7e 100644
--- a/speech.py
+++ b/speech.py
@@ -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