-
Notifications
You must be signed in to change notification settings - Fork 100
Description
I have flow steps where the spoken text must be exactly what I specify—no creative liberties. Is there a way in pipecat-flows to send a fixed string directly to the TTS provider without any LLM involvement?
Goal
Trigger TTS with a predefined string and have that exact text synthesized.
Why
Certain parts of the experience (e.g., medical/compliance disclaimers and confirmations) must be deterministic. As soon as an LLM is in the loop, there’s uncertainty about what will be said.
Questions
Is there an existing node/operator/pattern to do a literal “say” that bypasses the LLM entirely?
Can I wire a static text source directly into TTS in the current API?
If this exists, could you point me to an example?
I have tried creating a node that uses pre_actions, but the LLM is still invoked.
def create_message_only_node(node_name: str, message: str, end_conversation: bool = True) -> NodeConfig:
pre_actions = [
{
"type": "tts_say",
"text": message,
}
]
if end_conversation:
pre_actions.append({
"type": "end_conversation"
})
return NodeConfig(
name=node_name,
role_messages=[], # Empty role messages to clear context
task_messages=[], # Empty task messages so LLM has nothing to respond to
pre_actions=pre_actions,
functions=[], # No functions to call
respond_immediately=False,
)