diff options
Diffstat (limited to 'speak/espeak_gst.py')
-rw-r--r-- | speak/espeak_gst.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/speak/espeak_gst.py b/speak/espeak_gst.py index 9cbe187..85cfa26 100644 --- a/speak/espeak_gst.py +++ b/speak/espeak_gst.py @@ -1,5 +1,3 @@ -# Copyright (C) 2009, Aleksey 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 # the Free Software Foundation; either version 2 of the License, or @@ -27,15 +25,11 @@ RATE_DEFAULT = RATE_MAX/2 class AudioGrabGst(espeak.BaseAudioGrab): def speak(self, status, text): - # XXX workaround for http://bugs.sugarlabs.org/ticket/1801 - if not [i for i in text if i.isalnum()]: - return - self.make_pipeline('espeak name=espeak ! wavenc') src = self.pipeline.get_by_name('espeak') - pitch = int(status.pitch) - 120 - rate = int(status.rate) - 120 + pitch = int(status.pitch) - 100 + rate = int(status.rate) - 100 logger.debug('pitch=%d rate=%d voice=%s text=%s' % (pitch, rate, status.voice.name, text)) @@ -52,6 +46,9 @@ def voices(): for i in gst.element_factory_make('espeak').props.voices: name, language, dialect = i + if name in ('en-rhotic','english_rp','english_wmids'): + # these voices don't produce sound + continue out.append((language, name)) return out |