Always call stop_playback even when there is no user request

This commit is contained in:
Fabio Manganiello 2018-03-26 00:32:03 +02:00
parent 1f2b5432b3
commit 7dd3bb9915
1 changed files with 6 additions and 3 deletions

View File

@ -299,10 +299,13 @@ class SampleAssistant(object):
logging.info('Finished playing assistant response.')
if user_request:
try:
self.conversation_stream.stop_playback()
if self.on_speech_recognized:
self.on_speech_recognized(user_request)
except:
pass
if user_request and self.on_speech_recognized:
self.on_speech_recognized(user_request)
return (user_request, continue_conversation)