examples(foundational): use TTSSpeakFrame instead of TTSService.say()

This commit is contained in:
Aleix Conchillo Flaqué
2025-08-07 13:37:05 -07:00
parent 11119430cd
commit 2b8218deaa
6 changed files with 12 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ from loguru import logger
from pipecat.audio.vad.silero import SileroVADAnalyzer
from pipecat.audio.vad.vad_analyzer import VADParams
from pipecat.frames.frames import TTSSpeakFrame
from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner
from pipecat.pipeline.task import PipelineParams, PipelineTask
@@ -87,7 +88,7 @@ async def load_conversation(params: FunctionCallParams):
logger.debug(
f"loaded conversation from {filename}\n{json.dumps(params.context.messages, indent=4)}"
)
await tts.say("Ok, I've loaded that conversation.")
await params.llm.queue_frame(TTSSpeakFrame("Ok, I've loaded that conversation."))
except Exception as e:
await params.result_callback({"success": False, "error": str(e)})