From e43b3869c314c4bc0cd7df53bd46d44c49d016fb Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Sat, 2 Aug 2025 08:49:59 -0400 Subject: [PATCH] Suppress pydub SyntaxWarning from the cartesia module --- src/pipecat/services/cartesia/tts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipecat/services/cartesia/tts.py b/src/pipecat/services/cartesia/tts.py index c4ea7c31c..c731a6984 100644 --- a/src/pipecat/services/cartesia/tts.py +++ b/src/pipecat/services/cartesia/tts.py @@ -34,6 +34,10 @@ from pipecat.utils.text.base_text_aggregator import BaseTextAggregator from pipecat.utils.text.skip_tags_aggregator import SkipTagsAggregator from pipecat.utils.tracing.service_decorators import traced_tts +# Suppress regex warnings from pydub (used by cartesia) +warnings.filterwarnings("ignore", message="invalid escape sequence", category=SyntaxWarning) + + # See .env.example for Cartesia configuration needed try: from cartesia import AsyncCartesia