From 8a5f3fb4090c9aad6a293e8990377570f4490329 Mon Sep 17 00:00:00 2001 From: Luis Andrade Date: Thu, 8 Feb 2024 00:25:53 -0500 Subject: [PATCH] bugfix played event --- wyoming_satellite/satellite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wyoming_satellite/satellite.py b/wyoming_satellite/satellite.py index 31aba25..e68d5c5 100644 --- a/wyoming_satellite/satellite.py +++ b/wyoming_satellite/satellite.py @@ -550,7 +550,8 @@ async def _disconnect() -> None: event.type ): await _disconnect() - await self.trigger_played() + if not hasattr(event, 'wav'): + await self.trigger_played() snd_client = None # reconnect on next event except asyncio.CancelledError: break @@ -596,6 +597,7 @@ async def _play_wav( samples_per_chunk=self.settings.snd.samples_per_chunk, volume_multiplier=self.settings.snd.volume_multiplier, ): + event.wav = True await self.event_to_snd(event) except Exception: # Unmute in case of an error