OSDN Git Service

synthDriverHandler.setSynth now takes a isFallback keyword argument which is set...
authorMichael Curran <mick@kulgan.net>
Wed, 7 Nov 2012 06:29:04 +0000 (16:29 +1000)
committerMichael Curran <mick@kulgan.net>
Wed, 7 Nov 2012 06:29:04 +0000 (16:29 +1000)
source/synthDriverHandler.py
user_docs/en/changes.t2t

index e654268..deae761 100644 (file)
@@ -59,7 +59,7 @@ def getSynthList():
 def getSynth():\r
        return _curSynth\r
 \r
-def setSynth(name):\r
+def setSynth(name,isFallback=False):\r
        global _curSynth\r
        if name is None: \r
                _curSynth.terminate()\r
@@ -89,17 +89,18 @@ def setSynth(name):
                        changeVoice(newSynth,voice)\r
                        newSynth.saveSettings() #save defaults\r
                _curSynth=newSynth\r
-               config.conf["speech"]["synth"]=name\r
+               if not isFallback:\r
+                       config.conf["speech"]["synth"]=name\r
                log.info("Loaded synthDriver %s"%name)\r
                return True\r
        except:\r
                log.error("setSynth", exc_info=True)\r
                if prevSynthName:\r
-                       setSynth(prevSynthName)\r
+                       setSynth(prevSynthName,isFallback=True)\r
                elif name not in ('espeak','silence'):\r
-                       setSynth('espeak')\r
+                       setSynth('espeak',isFallback=True)\r
                elif name=='espeak':\r
-                       setSynth('silence')\r
+                       setSynth('silence',isFallback=True)\r
                return False\r
 \r
 class SynthSetting(object):\r
index 29cbd89..9a897bd 100644 (file)
@@ -11,7 +11,8 @@
 \r
 == Bug Fixes ==\r
 - The quick navigation keys for jumping to the next or previous separator in Browse Mode now works in Internet Explorer and other MSHTML controls. (#2781)\r
-\r
+- If NVDA falls back to eSpeak or  no speech due to a configured speech synthesizer failing when NVDA starts, the configuration is no longer updated to set the fallback synthesizer as the configured choice, meaning that now the original synthesizer will be tried again next time NVDA starts.\r
\r
 \r
 = 2012.3 =\r
 Highlights of this release include support for Asian character input; experimental support for touch screens on Windows 8; reporting of page numbers and improved support for tables in Adobe Reader; table navigation commands in focused table rows and Windows list-view controls; support for several more braille displays; and reporting of row and column headers in Microsoft Excel.\r