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):
|
def play_audio(self):
|
||||||
async def run():
|
async def run():
|
||||||
while self.active:
|
while self.active:
|
||||||
audio = self.output_audio_queue.get()
|
try:
|
||||||
await self.output_device.send_async(audio)
|
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 = asyncio.new_event_loop()
|
||||||
loop.run_until_complete(run())
|
loop.run_until_complete(run())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue