[orca] Add some debugging to illustrate the weird voice speech-dispatcher/espeak bug
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add some debugging to illustrate the weird voice speech-dispatcher/espeak bug
- Date: Fri, 6 Nov 2015 06:19:37 +0000 (UTC)
commit 2093d2a59ec768737cfb39431aab790f8c89444c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Nov 6 01:17:25 2015 -0500
Add some debugging to illustrate the weird voice speech-dispatcher/espeak bug
src/orca/speech.py | 4 ++--
src/orca/speechdispatcherfactory.py | 17 ++++++++++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/speech.py b/src/orca/speech.py
index 98a4f63..ca981b5 100644
--- a/src/orca/speech.py
+++ b/src/orca/speech.py
@@ -152,7 +152,7 @@ def _speak(text, acss, interrupt):
extraDebug = " voice=%s" % key
break
- debug.println(debug.LEVEL_INFO, logLine + extraDebug)
+ debug.println(debug.LEVEL_INFO, logLine + extraDebug + str(acss))
log.info(logLine + extraDebug)
if _speechserver:
@@ -250,7 +250,7 @@ def speakCharacter(character, acss=None):
if settings.silenceSpeech:
return
- debug.println(debug.LEVEL_INFO, "SPEECH OUTPUT: '" + character + "'")
+ debug.println(debug.LEVEL_INFO, "SPEECH OUTPUT: '" + character + "' " + str(acss))
log.info("SPEECH OUTPUT: '%s'" % character)
if _speechserver:
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index d808060..01d0bfb 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -227,7 +227,21 @@ class SpeechServer(speechserver.SpeechServer):
name = acss_family.get(speechserver.VoiceFamily.NAME)
if name != self._default_voice_name:
self._send_command(set_synthesis_voice, name)
-
+
+ def _debug_sd_values(self, prefix=""):
+ if debug.debugLevel > debug.LEVEL_INFO:
+ return
+
+ current = self._current_voice_properties
+ msg = "SPEECH DISPATCHER: %sOrca rate %s, pitch %s; " \
+ "SD rate %s, pitch %s" % \
+ (prefix,
+ self._current_voice_properties.get(ACSS.RATE),
+ self._current_voice_properties.get(ACSS.AVERAGE_PITCH),
+ self._send_command(self._client.get_rate),
+ self._send_command(self._client.get_pitch))
+ debug.println(debug.LEVEL_INFO, msg)
+
def _apply_acss(self, acss):
if acss is None:
acss = settings.voices[settings.DEFAULT_VOICE]
@@ -305,6 +319,7 @@ class SpeechServer(speechserver.SpeechServer):
text = text.replace('\n.', '\n')
self._apply_acss(acss)
+ self._debug_sd_values("Speaking '%s' " % text)
self._send_command(self._client.speak, text, **kwargs)
def _say_all(self, iterator, orca_callback):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]