fix termination story
This commit is contained in:
parent
25247807f3
commit
a773179946
1 changed files with 5 additions and 2 deletions
|
|
@ -50,8 +50,11 @@ class Conversation:
|
|||
def play_audio(self):
|
||||
async def run():
|
||||
while self.active:
|
||||
audio = self.output_audio_queue.get()
|
||||
await self.output_device.send_async(audio)
|
||||
try:
|
||||
audio = self.output_audio_queue.get(timeout=5)
|
||||
await self.output_device.send_async(audio)
|
||||
except queue.Empty:
|
||||
continue
|
||||
loop = asyncio.new_event_loop()
|
||||
loop.run_until_complete(run())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue