Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Commit bf92014

Browse files
authored
Merge pull request #2361 from MycroftAI/bug/listen_arg
Bug/listen arg
2 parents cf75ef9 + ddad8d1 commit bf92014

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mycroft/tts/espeak_tts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class ESpeak(TTS):
2121
def __init__(self, lang, config):
2222
super(ESpeak, self).__init__(lang, config, ESpeakValidator(self))
2323

24-
def execute(self, sentence, ident=None):
24+
def execute(self, sentence, ident=None, listen=False):
2525
self.begin_audio()
2626
subprocess.call(
2727
['espeak', '-v', self.lang + '+' + self.voice, sentence])
28-
self.end_audio()
28+
self.end_audio(listen)
2929

3030

3131
class ESpeakValidator(TTSValidator):

mycroft/tts/remote_tts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, lang, config, url, api_path, validator):
4040
self.url = remove_last_slash(url)
4141
self.session = FuturesSession()
4242

43-
def execute(self, sentence, ident=None):
43+
def execute(self, sentence, ident=None, listen=False):
4444
phrases = self.__get_phrases(sentence)
4545

4646
if len(phrases) > 0:
@@ -51,7 +51,7 @@ def execute(self, sentence, ident=None):
5151
except Exception as e:
5252
LOG.error(e.message)
5353
finally:
54-
self.end_audio()
54+
self.end_audio(listen)
5555

5656
@staticmethod
5757
def __get_phrases(sentence):

mycroft/tts/spdsay_tts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class SpdSay(TTS):
2121
def __init__(self, lang, config):
2222
super(SpdSay, self).__init__(lang, config, SpdSayValidator(self))
2323

24-
def execute(self, sentence, ident=None):
24+
def execute(self, sentence, ident=None, listen=False):
2525
self.begin_audio()
2626
subprocess.call(
2727
['spd-say', '-l', self.lang, '-t', self.voice, sentence])
28-
self.end_audio()
28+
self.end_audio(listen)
2929

3030

3131
class SpdSayValidator(TTSValidator):

0 commit comments

Comments
 (0)