From 5c85d05a3add414b224e7880aae82736c098e80b Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 29 Apr 2009 17:37:45 +0000 Subject: Pronounce gettext strings in native language --- (limited to 'Speak.activity/voice.py') diff --git a/Speak.activity/voice.py b/Speak.activity/voice.py index 38984c6..ecd3d5d 100644 --- a/Speak.activity/voice.py +++ b/Speak.activity/voice.py @@ -72,6 +72,7 @@ expectedVoiceNames = [ ] _allVoices = {} +DEFAULT = None class Voice: def __init__(self, language, name): @@ -112,9 +113,7 @@ def allVoices(): _allVoices[voice.friendlyname] = voice return _allVoices - - -def defaultVoice(): +def _defaultVoice(): """Try to figure out the default voice, from the current locale ($LANG). Fall back to espeak's voice called Default.""" @@ -143,3 +142,5 @@ def defaultVoice(): print "Best voice for LANG %s seems to be %s %s" % (lang, best.language, best.friendlyname) return best + +DEFAULT = _defaultVoice() -- cgit v0.9.1