Wait while speaking before running __get_response (#1432)

This fixes issues with long TTS responses
pull/1439/head
Matthew D. Scholefield 2018-02-23 01:49:06 -06:00 committed by Steve Penrod
parent b58a533e39
commit efc1c1d71e
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@ from os.path import join, abspath, dirname, basename, exists
from threading import Event
from mycroft.api import DeviceApi
from mycroft.audio import wait_while_speaking
from mycroft.client.enclosure.api import EnclosureAPI
from mycroft.configuration import Configuration
from mycroft.dialog import DialogLoader
@ -396,6 +397,7 @@ class MycroftSkill(object):
on_fail_fn = on_fail if callable(on_fail) else on_fail_default
self.speak(get_announcement(), expect_response=True)
wait_while_speaking()
num_fails = 0
while True:
response = self.__get_response()