From a98d78cdea6402253f7c417a68c08d3656138f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 12 Sep 2024 00:20:06 -0700 Subject: [PATCH] services(lmnt): change to subclass of AsyncTTSService --- src/pipecat/services/lmnt.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pipecat/services/lmnt.py b/src/pipecat/services/lmnt.py index f7afd6a41..59dd0aa5f 100644 --- a/src/pipecat/services/lmnt.py +++ b/src/pipecat/services/lmnt.py @@ -20,7 +20,7 @@ from pipecat.frames.frames import ( TTSStartedFrame, TTSStoppedFrame, ) -from pipecat.services.ai_services import TTSService +from pipecat.services.ai_services import AsyncTTSService from loguru import logger @@ -34,7 +34,7 @@ except ModuleNotFoundError as e: raise Exception(f"Missing module: {e}") -class LmntTTSService(TTSService): +class LmntTTSService(AsyncTTSService): def __init__( self, @@ -44,11 +44,9 @@ class LmntTTSService(TTSService): sample_rate: int = 24000, language: str = "en", **kwargs): - super().__init__(**kwargs) - # Let TTSService produce TTSStoppedFrames after a short delay of # no activity. - self._push_stop_frames = True + super().__init__(push_stop_frames=True, **kwargs) self._api_key = api_key self._voice_id = voice_id