Files
pipecat/src/pipecat/serializers/abstract_frame_serializer.py
2024-05-13 16:22:11 -07:00

17 lines
343 B
Python

from abc import abstractmethod
from pipecat.pipeline.frames import Frame
class FrameSerializer:
def __init__(self):
pass
@abstractmethod
def serialize(self, frame: Frame) -> bytes:
raise NotImplementedError
@abstractmethod
def deserialize(self, data: bytes) -> Frame:
raise NotImplementedError