[orca] Don't insert a pause when punctuation is set to all



commit a020d3d22c8e738a32018bdb1f0192084ac57e3f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Feb 11 16:20:08 2020 +0100

    Don't insert a pause when punctuation is set to all
    
    To accomplish breaking up speech into chunks separated by pauses, we
    append a period because that seems to work regardless of synthesizer.
    Unfortunately, when punctuation is set to all, the synthesizer speaks
    that period.
    
    We can probably improve our logic to break things up in another way
    and/or request API from speech-dispatcher for pause insertion. In the
    meantime, prevent the period from being spoken.

 src/orca/speech_generator.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index b50e86ae7..46d9b7bce 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -2736,6 +2736,11 @@ class SpeechGenerator(generator.Generator):
         if not _settingsManager.getSetting('enablePauseBreaks') \
            or args.get('eliminatePauses', False):
             return []
+
+        if _settingsManager.getSetting('verbalizePunctuationStyle') == \
+           settings.PUNCTUATION_STYLE_ALL:
+            return []
+
         return PAUSE
 
     def _generateLineBreak(self, obj, **args):


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