[orca: 1/2] speech: fix index reporting



commit 21633eafd683cdd2d5aa0f4a4a762aacbfc181d3
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Mon Jul 23 13:01:31 2018 +0200

    speech: fix index reporting
    
    In multiline text, the marks are based to the startOffset of the bit being
    spoken. startOffset thus needs to be added to the mark before reporting to
    the rest of Orca.

 src/orca/speechdispatcherfactory.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index 1924ba548..607748461 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -434,8 +434,8 @@ class SpeechServer(speechserver.SpeechServer):
                 t = self._CALLBACK_TYPE_MAP[callbackType]
                 if t == speechserver.SayAllContext.PROGRESS:
                     if index_mark:
-                        context.currentOffset = int(index_mark)
-                        msg = "SPEECH DISPATCHER: Got mark %d" % context.currentOffset
+                        context.currentOffset = context.startOffset + int(index_mark)
+                        msg = "SPEECH DISPATCHER: Got mark %d / %d-%d" % (context.currentOffset, 
context.startOffset, context.endOffset)
                         debug.println(debug.LEVEL_INFO, msg, True)
                     else:
                         context.currentOffset = context.startOffset


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