BaseOutputTransport: cleanup audio buffer after bot stops talking

This commit is contained in:
Aleix Conchillo Flaqué
2025-02-25 13:06:43 -08:00
parent 8acf9a488b
commit 27161f8e3b

View File

@@ -232,6 +232,9 @@ class BaseOutputTransport(FrameProcessor):
await self.push_frame(BotStoppedSpeakingFrame())
await self.push_frame(BotStoppedSpeakingFrame(), FrameDirection.UPSTREAM)
self._bot_speaking = False
# Clean audio buffer (there could be tiny left overs if not multiple
# to our output chunk size).
self._audio_buffer = bytearray()
#
# Sink tasks