async def process_frame(self, frame: Frame, direction: FrameDirection):
        """
        Processes an incoming frame and determines whether to produce it as a ProducerItem.

        If the frame meets the produce criteria, it will be added to the consumer queues.
        If passthrough is enabled, the frame will also be sent to consumers.

        Args:
            frame (Frame): The frame to process.
            direction (FrameDirection): The direction of the frame.
        """
        await super().process_frame(frame, direction)

        if await self._filter(frame):
            await self._produce(frame)
            if self._passthrough:
                await self.push_frame(frame, direction)
        else:
            await self.push_frame(frame, direction)

        Processes an incoming frame and determines whether to produce it as a ProducerItem.

        If the frame meets the produce criteria, it will be added to the consumer queues.
        If passthrough is enabled, the frame will also be sent to consumers.

        Args:
            frame (Frame): The frame to process.
            direction (FrameDirection): The direction of the frame.
        
src/pipecat/processors/producer_processor.py