async def _listen_for_new_word(self):
        """Listen for new word notifications and flag a reset is needed."""
        while True:
            # Wait for a new word notification
            await self._new_word_notifier.wait()
            logger.info(
                f"{self}: Received new word notification, disconnecting and waiting for host to finish"
            )

            # Disconnect immediately to stop processing
            await self._disconnect()

            # Reset the system instruction
            self._system_instruction = self._base_system_instruction

            # Flag that we need to reconnect when the host stops speaking
            self._pending_reset = True
Listen for new word notifications and flag a reset is needed.
examples/word-wrangler-gemini-live/server/bot_phone_local.py