polly: renamed AWSTTSService to PollyTTSService

This commit is contained in:
Aleix Conchillo Flaqué
2024-12-11 16:31:27 -08:00
parent def415f476
commit 133e1aff6c
3 changed files with 21 additions and 4 deletions

View File

@@ -108,7 +108,7 @@ def language_to_aws_language(language: Language) -> str | None:
return language_map.get(language)
class AWSTTSService(TTSService):
class PollyTTSService(TTSService):
class InputParams(BaseModel):
engine: Optional[str] = None
language: Optional[Language] = Language.EN
@@ -244,3 +244,16 @@ class AWSTTSService(TTSService):
finally:
yield TTSStoppedFrame()
class AWSTTSService(PollyTTSService):
def __init__(self, **kwargs):
super().__init__(**kwargs)
import warnings
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"'AWSTTSService' is deprecated, use 'PollyTTSService' instead.", DeprecationWarning
)