From be6ea0dbf6971ce6e7a47538d0d8973cb7d2bb71 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Mon, 11 Aug 2025 19:57:09 -0400 Subject: [PATCH] Code review feedback --- src/pipecat/services/playht/tts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipecat/services/playht/tts.py b/src/pipecat/services/playht/tts.py index 03a853d60..3c03e8335 100644 --- a/src/pipecat/services/playht/tts.py +++ b/src/pipecat/services/playht/tts.py @@ -454,7 +454,7 @@ class PlayHTHttpTTSService(TTSService): super().__init__(sample_rate=sample_rate, **kwargs) # Warn about deprecated protocol parameter if explicitly provided - if protocol is not None: + if protocol: warnings.warn( "The 'protocol' parameter is deprecated and will be removed in a future version.", DeprecationWarning, @@ -569,7 +569,9 @@ class PlayHTHttpTTSService(TTSService): in_header = True buffer = b"" - async for chunk in response.content.iter_chunked(8192): + CHUNK_SIZE = self.chunk_size + + async for chunk in response.content.iter_chunked(CHUNK_SIZE): if len(chunk) == 0: continue