send played event at the disconnect of client

This commit is contained in:
Luis Andrade
2024-01-19 04:36:14 +00:00
parent 160370be5a
commit 71ab73ad73
+2 -1
View File
@@ -25,7 +25,7 @@ from wyoming.satellite import (
StreamingStarted,
StreamingStopped,
)
from wyoming.snd import SndProcessAsyncClient
from wyoming.snd import SndProcessAsyncClient, Played
from wyoming.tts import Synthesize
from wyoming.vad import VoiceStarted, VoiceStopped
from wyoming.wake import Detect, Detection, WakeProcessAsyncClient
@@ -550,6 +550,7 @@ class SatelliteBase:
event.type
):
await _disconnect()
await self.forward_event(Played().event())
snd_client = None # reconnect on next event
except asyncio.CancelledError:
break