From 3894d2a4b9fd8c339882720b357656f79ba92545 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 9 Oct 2025 22:03:06 -0400 Subject: [PATCH] Deprecate LivekitFrameSerializer --- CHANGELOG.md | 2 ++ src/pipecat/serializers/livekit.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b31d93f..9763f78f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +- `LivekitFrameSerializer` is now deprecated. Use `LiveKitTransport` instead. + - `pipecat.service.openai_realtime` is now deprecated, use `pipecat.services.openai.realtime` instead or `pipecat.services.azure.realtime` for Azure Realtime. diff --git a/src/pipecat/serializers/livekit.py b/src/pipecat/serializers/livekit.py index 3d4188960..f3a34c434 100644 --- a/src/pipecat/serializers/livekit.py +++ b/src/pipecat/serializers/livekit.py @@ -25,11 +25,31 @@ except ModuleNotFoundError as e: class LivekitFrameSerializer(FrameSerializer): """Serializer for converting between Pipecat frames and LiveKit audio frames. + .. deprecated:: 0.0.90 + + This class is deprecated and will be removed in a future version. + Please use LiveKitTransport instead, which handles audio streaming + and frame conversion natively. + This serializer handles the conversion of Pipecat's OutputAudioRawFrame objects to LiveKit AudioFrame objects for transmission, and the reverse conversion for received audio data. """ + def __init__(self): + """Initialize the LiveKit frame serializer.""" + super().__init__() + import warnings + + with warnings.catch_warnings(): + warnings.simplefilter("always") + warnings.warn( + "LivekitFrameSerializer is deprecated and will be removed in a future version. " + "Please use LiveKitTransport instead, which handles audio streaming natively.", + DeprecationWarning, + stacklevel=2, + ) + @property def type(self) -> FrameSerializerType: """Get the serializer type.