diff --git a/CHANGELOG.md b/CHANGELOG.md index 827e1fb88..ce801c3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated default `GoogleLLMService` model to `gemini-2.5-flash`. +### Deprecated + +- PlayHT is shutting down their API on December 31st, 2025. As a result, + `PlayHTTTSService` and `PlayHTHttpTTSService` are deprecated and will be + removed in a future version. + ### Fixed - Fixed an issue with `AWSNovaSonicLLMService` where the client wouldn't diff --git a/scripts/evals/run-release-evals.py b/scripts/evals/run-release-evals.py index 3fc55d983..206cf848e 100644 --- a/scripts/evals/run-release-evals.py +++ b/scripts/evals/run-release-evals.py @@ -75,8 +75,6 @@ TESTS_07 = [ EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST, ), - ("07e-interruptible-playht.py", PROMPT_SIMPLE_MATH, EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST), - ("07e-interruptible-playht-http.py", PROMPT_SIMPLE_MATH, EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST), ("07f-interruptible-azure.py", PROMPT_SIMPLE_MATH, EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST), ("07g-interruptible-openai.py", PROMPT_SIMPLE_MATH, EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST), ("07h-interruptible-openpipe.py", PROMPT_SIMPLE_MATH, EVAL_SIMPLE_MATH, BOT_SPEAKS_FIRST), diff --git a/src/pipecat/services/playht/tts.py b/src/pipecat/services/playht/tts.py index 0f23b7b5e..9288ebd59 100644 --- a/src/pipecat/services/playht/tts.py +++ b/src/pipecat/services/playht/tts.py @@ -14,6 +14,7 @@ import io import json import struct import uuid +import warnings from typing import AsyncGenerator, Optional import aiohttp @@ -110,6 +111,11 @@ def language_to_playht_language(language: Language) -> Optional[str]: class PlayHTTTSService(InterruptibleTTSService): """PlayHT WebSocket-based text-to-speech service. + .. deprecated:: 0.0.88 + + This class is deprecated and will be removed in a future version. + PlayHT is shutting down their API on December 31st, 2025. + Provides real-time text-to-speech synthesis using PlayHT's WebSocket API. Supports streaming audio generation with configurable voice engines and language settings. @@ -158,6 +164,15 @@ class PlayHTTTSService(InterruptibleTTSService): **kwargs, ) + with warnings.catch_warnings(): + warnings.simplefilter("always") + warnings.warn( + "PlayHT is shutting down their API on December 31st, 2025. " + "'PlayHTTTSService' is deprecated and will be removed in a future version.", + DeprecationWarning, + stacklevel=2, + ) + params = params or PlayHTTTSService.InputParams() self._api_key = api_key @@ -401,6 +416,11 @@ class PlayHTTTSService(InterruptibleTTSService): class PlayHTHttpTTSService(TTSService): """PlayHT HTTP-based text-to-speech service. + .. deprecated:: 0.0.88 + + This class is deprecated and will be removed in a future version. + PlayHT is shutting down their API on December 31st, 2025. + Provides text-to-speech synthesis using PlayHT's HTTP API for simpler, non-streaming synthesis. Suitable for use cases where streaming is not required and simpler integration is preferred. @@ -454,8 +474,6 @@ class PlayHTHttpTTSService(TTSService): # Warn about deprecated protocol parameter if explicitly provided if protocol: - import warnings - with warnings.catch_warnings(): warnings.simplefilter("always") warnings.warn( @@ -464,6 +482,15 @@ class PlayHTHttpTTSService(TTSService): stacklevel=2, ) + with warnings.catch_warnings(): + warnings.simplefilter("always") + warnings.warn( + "PlayHT is shutting down their API on December 31st, 2025. " + "'PlayHTHttpTTSService' is deprecated and will be removed in a future version.", + DeprecationWarning, + stacklevel=2, + ) + params = params or PlayHTHttpTTSService.InputParams() self._user_id = user_id