diff options
author | Rafael Ortiz <rafael@activitycentral.com> | 2011-07-13 04:59:10 (GMT) |
---|---|---|
committer | Rafael Ortiz <rafael@activitycentral.com> | 2011-07-13 04:59:10 (GMT) |
commit | e33814dc9e60e0273b1e9467e23cfe69fe463e7e (patch) | |
tree | 8c4dbc8824cf45b2a031e72d202c4b746f5700e8 | |
parent | c48c3a44768038fae5e0f47ca7a41f21261ee2a3 (diff) |
adding english accents to espeak gst
-rw-r--r-- | speak/espeak_gst.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/speak/espeak_gst.py b/speak/espeak_gst.py index 85cfa26..9cbe187 100644 --- a/speak/espeak_gst.py +++ b/speak/espeak_gst.py @@ -1,3 +1,5 @@ +# 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 @@ -25,11 +27,15 @@ 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) - 100 - rate = int(status.rate) - 100 + pitch = int(status.pitch) - 120 + rate = int(status.rate) - 120 logger.debug('pitch=%d rate=%d voice=%s text=%s' % (pitch, rate, status.voice.name, text)) @@ -46,9 +52,6 @@ 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 |