frames: added VisionImageRawFrame
This commit is contained in:
@@ -1305,6 +1305,24 @@ class UserImageRawFrame(InputImageRawFrame):
|
||||
return f"{self.name}(pts: {pts}, user: {self.user_id}, source: {self.transport_source}, size: {self.size}, format: {self.format}, request: {self.request})"
|
||||
|
||||
|
||||
@dataclass
|
||||
class VisionImageRawFrame(InputImageRawFrame):
|
||||
"""Raw image input frame to be analyzed by vision services.
|
||||
|
||||
This is just an image with an associated text describing how the vision
|
||||
service should analyze the image.
|
||||
|
||||
Parameters:
|
||||
text: Description of how the vision service should analyze the image.
|
||||
"""
|
||||
|
||||
text: str
|
||||
|
||||
def __str__(self):
|
||||
pts = format_pts(self.pts)
|
||||
return f"{self.name}(pts: {pts}, source: {self.transport_source}, size: {self.size}, format: {self.format}, text: {self.text})"
|
||||
|
||||
|
||||
@dataclass
|
||||
class InputDTMFFrame(DTMFFrame, SystemFrame):
|
||||
"""DTMF keypress input frame from transport."""
|
||||
|
||||
Reference in New Issue
Block a user