VisionImageFrame
- class pipecat.processors.aggregators.vision_image_frame.VisionImageFrameAggregator[source]
Bases:
FrameProcessor
This aggregator waits for a consecutive TextFrame and an InputImageRawFrame. After the InputImageRawFrame arrives it will output a VisionImageRawFrame.
>>> from pipecat.frames.frames import ImageFrame
>>> async def print_frames(aggregator, frame): ... async for frame in aggregator.process_frame(frame): ... print(frame)
>>> aggregator = VisionImageFrameAggregator() >>> asyncio.run(print_frames(aggregator, TextFrame("What do you see?"))) >>> asyncio.run(print_frames(aggregator, ImageFrame(image=bytes([]), size=(0, 0)))) VisionImageFrame, text: What do you see?, image size: 0x0, buffer size: 0 B
- async process_frame(frame, direction)[source]
- Parameters:
frame (Frame)
direction (FrameDirection)