Nodes/ComfyUI Griptape Nodes/Griptape Tool: Text to Speech
ComfyUI Node

Griptape Tool: Text to Speech

The tool that lets your agent decide to talk

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Tool: Text to Speech
  • driver
  • TOOL
off_prompttrue

This is the node that gives your agent the ability to speak - as opposed to the drivers, which just configure how it sounds. The Griptape Tool: Text to Speech wraps TextToSpeechTool and hands it to your agent, and from then on the agent can decide to turn text into audio. A workflow that ends with a voice reading out a summary, an assistant that narrates its reasoning, a workflow that produces an actual spoken file - that's what this tool enables.

There's a useful contrast to keep straight, because the Griptape pack gives you two routes to speech. The task-based route (a Text-to-Speech task) forces speech on every run - you give it text, it speaks, done. This tool-based route is agentic: the agent decides when speech is warranted, based on your prompting. That's the difference between a workflow that always narrates and one that narrates when the task calls for it. For interactive or decision-driven setups, the tool is the flexible choice.

How it works

The node creates a TextToSpeechTool with a text-to-speech driver attached, and returns it as a TOOL_LIST. When your agent judges that speaking is the right move - you've told it to read the final answer aloud, or to announce something - it calls the tool, which renders the given text to audio through the driver. Note the small detail in the code: the default driver, if you don't supply one, is ElevenLabs (eleven_multilingual_v2, voice Matilda), pulling the key from your Griptape settings or ELEVEN_LABS_API_KEY env var. So the out-of-box behavior leans on ElevenLabs even though you never see an ElevenLabs node in the graph.

The inputs that matter

  • driver - optional, and worth connecting explicitly. Plug in a TEXT_TO_SPEECH_DRIVER (ElevenLabs or OpenAI) to control model and voice rather than accepting the hidden ElevenLabs default. If you're already using the OpenAI TTS driver elsewhere, reusing it here means one key, one billing story.
  • off_prompt - default True (Keep output private). The private-by-default stance makes sense for audio: the tool's raw output (audio) isn't fed back into the model context, and you only surface what you ask for.

One output, TOOL (TOOL_LIST), feeds an agent.

Install

Pack install, as always:

cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape

or ComfyUI Manager → search "Griptape" → install → restart.

Where people get burned

The silent-key failure is the big one: the default driver is ElevenLabs, so if you never set an ELEVEN_LABS_API_KEY (Settings → Griptape, or your environment), the tool can silently fail to produce audio. Either set the key or explicitly wire in an OpenAI TTS driver you already have a key for. Second, don't confuse this with a task node - the agent has to actually decide to speak, so prompt for it ("when you finish, read the answer out loud using your text-to-speech tool"). And third, remember you're on a paid TTS API; a chatty agent can rack up real character usage, so if you're iterating a lot, keep the tool's usage in mind - or use the OpenAI driver, which bills in fractions of a cent.

CategoryGriptape/Agent Tools

Inputs (2)

NameTypeDefaultDescription
off_promptBOOLEANtrue
driveroptTEXT_TO_SPEECH_DRIVER

Outputs (1)

NameTypeDescription
TOOLTOOL_LIST