File size: 401 Bytes
8d7f55c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# Copyright (c) 2024, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#

from abc import ABC, abstractmethod

from pipecat.frames.frames import Frame


class FrameSerializer(ABC):

    @abstractmethod
    def serialize(self, frame: Frame) -> str | bytes | None:
        pass

    @abstractmethod
    def deserialize(self, data: str | bytes) -> Frame | None:
        pass