[orca] Have speechgenerator always return a fully-populated voice definition



commit c094816c0f79a7314fb5542da68ca5de223fab99
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jul 20 12:32:02 2016 -0400

    Have speechgenerator always return a fully-populated voice definition

 src/orca/speech_generator.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index f7068a6..33f2baf 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -2251,14 +2251,15 @@ class SpeechGenerator(generator.Generator):
 
         voicename = voiceType.get(key) or voiceType.get(DEFAULT)
         voices = _settingsManager.getSetting('voices')
-        rv = voices.get(voicename)
-        if not rv or rv.get('established') == False:
-            rv = voices.get(voiceType.get(DEFAULT))
+        voice = acss.ACSS(voices.get(voiceType.get(DEFAULT)))
 
-        voice = acss.ACSS(rv)
         if key in [None, DEFAULT]:
             string = args.get('string', '')
             if isinstance(string, str) and string.isupper():
                 voice.update(voices.get(voiceType.get(UPPERCASE)))
+        else:
+            override = voices.get(voicename)
+            if override and override.get('established', True):
+                voice.update(override)
 
         return [voice]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]