Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/espeak_gst.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-02-28 22:18:16 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-02-28 22:18:37 (GMT)
commitc02aca65850836d4a8bcee1e730e21927e12051c (patch)
tree47b15dfe1c5b24afa6165be31d8a37796bde98ce /espeak_gst.py
parenta0f14888003c812b3fa95d8db30233943a31b0d5 (diff)
Fix pronunciation of unicode strings; keep history in unicode (Gonzalo Odiard)
Diffstat (limited to 'espeak_gst.py')
-rw-r--r--espeak_gst.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/espeak_gst.py b/espeak_gst.py
index 9c72994..b4af2c8 100644
--- a/espeak_gst.py
+++ b/espeak_gst.py
@@ -26,7 +26,8 @@ RATE_MAX = 200
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()]:
+ if not [i for i in text \
+ if unicode(i, 'utf-8', errors='ignore').isalnum()]:
return
self.make_pipeline('espeak name=espeak ! wavenc')