From e508642b0a2fb33e170a8b2b7f25635c29900e18 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Thu, 30 Apr 2026 09:31:22 -0400 Subject: [PATCH] refactor(cartesia): mark tag helpers as @staticmethod SPELL/EMOTION_TAG/PAUSE_TAG/VOLUME_TAG/SPEED_TAG are stateless and worked only via class-level access. Decorating them lets instance access work too and silences the missing-self lint warning. --- src/pipecat/services/cartesia/tts.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pipecat/services/cartesia/tts.py b/src/pipecat/services/cartesia/tts.py index 264493fcd..192d5dc90 100644 --- a/src/pipecat/services/cartesia/tts.py +++ b/src/pipecat/services/cartesia/tts.py @@ -391,22 +391,27 @@ class CartesiaTTSService(WebsocketTTSService): return language_to_cartesia_language(language) # A set of Cartesia-specific helpers for text transformations + @staticmethod def SPELL(text: str) -> str: """Wrap text in Cartesia spell tag.""" return f"{text}" + @staticmethod def EMOTION_TAG(emotion: CartesiaEmotion) -> str: """Convenience method to create an emotion tag.""" return f'' + @staticmethod def PAUSE_TAG(seconds: float) -> str: """Convenience method to create a pause tag.""" return f'' + @staticmethod def VOLUME_TAG(volume: float) -> str: """Convenience method to create a volume tag.""" return f'' + @staticmethod def SPEED_TAG(speed: float) -> str: """Convenience method to create a speed tag.""" return f''