[orca] Add emitSpeechOnPauses setting (bgo#585417)
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca] Add emitSpeechOnPauses setting (bgo#585417)
- Date: Mon, 20 Jul 2009 16:48:24 +0000 (UTC)
commit 1c8017c101bfdc6f61f23cf35a3c5c0f3350764f
Author: Willie Walker <william walker sun com>
Date: Mon Jul 20 12:42:55 2009 -0400
Add emitSpeechOnPauses setting (bgo#585417)
This setting (default=True) determines whether Orca sends speech to the
speech synthesis engine immediately when a pause is enountered in a
speech formatting string or if it should wait to process the entire string.
This is added because some speech systems work well when speech is
emitted immediately (e.g., gnome-speech works well) whereas others
introduce a terribly long painful pause (e.g., speech dispatcher does this).
src/orca/settings.py | 8 ++++++++
src/orca/speech.py | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/settings.py b/src/orca/settings.py
index e2d2bac..6a65714 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -1341,3 +1341,11 @@ brailleTableCellDelimiter = " "
# sorted out just right.
#
useExperimentalSpeechProsody = True
+
+# If True, whenever a 'pause' keyword is found in a speech formatting
+# string, any string being created will be sent to the speech synthesis
+# system immediately. This is for bug #585417 and allows for some
+# adaptation to how different systems handle queued speech. For example,
+# some introduce unnaturally long pauses between requests to speak.
+#
+emitSpeechOnPauses = True
diff --git a/src/orca/speech.py b/src/orca/speech.py
index 5e189eb..1ab9b6a 100644
--- a/src/orca/speech.py
+++ b/src/orca/speech.py
@@ -192,8 +192,9 @@ def speak(content, acss=None, interrupt=True):
if subString:
if subString[-1] != ".":
subString += "."
- _speak(subString, acss, interrupt)
- subString = None
+ if settings.emitSpeechOnPauses:
+ _speak(subString, acss, interrupt)
+ subString = None
elif isinstance(element, speech_generator.LineBreak):
if subString:
_speak(subString, acss, interrupt)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]