Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Speak.activity/voice.py
diff options
context:
space:
mode:
authorAleksey 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)
commit5c85d05a3add414b224e7880aae82736c098e80b (patch)
treef4432338274ee7c3112f51a0494361b742bf167c /Speak.activity/voice.py
parentb419cad17826b53940deb8c95935035b99e0e836 (diff)
Pronounce gettext strings in native language
Diffstat (limited to 'Speak.activity/voice.py')
-rw-r--r--Speak.activity/voice.py7
1 files changed, 4 insertions, 3 deletions
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()