diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-29 17:37:45 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-29 17:37:45 (GMT) |
commit | 5c85d05a3add414b224e7880aae82736c098e80b (patch) | |
tree | f4432338274ee7c3112f51a0494361b742bf167c /Speak.activity/face.py | |
parent | b419cad17826b53940deb8c95935035b99e0e836 (diff) |
Pronounce gettext strings in native language
Diffstat (limited to 'Speak.activity/face.py')
-rw-r--r-- | Speak.activity/face.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Speak.activity/face.py b/Speak.activity/face.py index e595a5e..ffb88c3 100644 --- a/Speak.activity/face.py +++ b/Speak.activity/face.py @@ -43,7 +43,7 @@ FACE_PAD = 2 class Status: def __init__(self): - self.voice = voice.defaultVoice() + self.voice = voice.DEFAULT self.pitch = audio.PITCH_DEFAULT self.rate = audio.RATE_DEFAULT self.eyes = [eye.Eye] * 2 @@ -81,6 +81,15 @@ class Status: return self + def clone(self): + new = Status() + new.voice = self.voice + new.pitch = self.pitch + new.rate = self.rate + new.eyes = self.eyes + new.mouth = self.mouth + return new + class View(gtk.EventBox): def __init__(self, fill_color=style.COLOR_BUTTON_GREY): gtk.EventBox.__init__(self) @@ -163,6 +172,11 @@ class View(gtk.EventBox): def say(self, something): self._audio.speak(self._peding or self.status, something) + def say_notification(self, something): + status = (self._peding or self.status).clone() + status.voice = voice.DEFAULT + self._audio.speak(status, something) + def shut_up(self): self._audio.stop_sound_device() |