Commit ce033c08 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Re-enable the "interrupt" option in speechdispatcher factory

speak() and speakUtterances() had the use of the interrupt argument
commented out back in 2007 due to unspecified issues. In 2013, we
enabled this and then immediately re-disabled it due to regressions.
Most of the code handles interruption via explicitly calling the
script's presentationInterrupt method which calls speech.stop,
which causes _cancel to be called in speechdispatcher factory. That
said, there may be downstream/external scripts/functionality that
for some reason isn't calling presentationInterrupt or stop. And
having this option in place but non functioning seems silly. So we'll
re-enable it but set the default value to False in the hopes that we
minimize the number of regressions that may be unexpectedly introduced
by this change.
parent 5a191227
......@@ -585,9 +585,9 @@ class SpeechServer(speechserver.SpeechServer):
return families
def speak(self, text=None, acss=None, interrupt=True):
#if interrupt:
# self._cancel()
def speak(self, text=None, acss=None, interrupt=False):
if interrupt:
self._cancel()
# "We will not interrupt a key echo in progress." (Said the comment in
# speech.py where these next two lines used to live. But the code here
......@@ -599,9 +599,10 @@ class SpeechServer(speechserver.SpeechServer):
if text:
self._speak(text, acss)
def speakUtterances(self, utteranceList, acss=None, interrupt=True):
#if interrupt:
# self._cancel()
def speakUtterances(self, utteranceList, acss=None, interrupt=False):
if interrupt:
self._cancel()
for utterance in utteranceList:
if utterance:
self._speak(utterance, acss)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment