Nodes/ComfyUI Griptape Nodes/Griptape Text To Speech Driver: OpenAI
ComfyUI Node

Griptape Text To Speech Driver: OpenAI

Cheap, good-enough voice for your Griptape agent

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Text To Speech Driver: OpenAI
    • DRIVER
    text_to_speech_modeltts-1
    voicealloy
    api_key_env_varOPENAI_API_KEY

    If you already have an OpenAI API key in this pack, this is the text-to-speech driver you should default to. It's the "good enough and cheap" option next to the ElevenLabs driver: same idea - a config node that produces a TEXT_TO_SPEECH_DRIVER for your agent - but the voices are OpenAI's stock set and the pricing is pennies. You reach for it when you want your workflow to narrate its result out loud without standing up an ElevenLabs account or watching a character meter tick over.

    There's a subtle upgrade path here worth knowing: the model dropdown includes gpt-4o-mini-tts, OpenAI's newer TTS model that takes a plain-language instruction for how to speak ("read this like you're excited about it") alongside the text. Most people start on the default tts-1 and never look back, and honestly that's fine - this node is about adding voice to a workflow, not about chasing audio fidelity the way ElevenLabs users do.

    How it works

    It wraps Griptape's OpenAiTextToSpeechDriver. You pick a model and a voice from dropdowns (both are proper enum lists, not free text, so you can't fat-finger a voice name), and the node emits a driver object. The API key is read from an environment variable by name at creation time. Same pattern as every other driver in this pack: configure here, consume downstream.

    The inputs that matter

    • text_to_speech_model - default tts-1, with tts-1-hd and gpt-4o-mini-tts available. tts-1-hd sounds marginally better at a slightly higher price; for narration inside a workflow you usually can't tell.
    • voice - default alloy, with echo, fable, onyx, nova, and shimmer to choose from. These are OpenAI's fixed voices; there's no custom-voice upload like ElevenLabs.
    • api_key_env_var - default OPENAI_API_KEY. Same rule as every driver here: this is the name of the env var, never the key itself.

    One output, DRIVER (TEXT_TO_SPEECH_DRIVER), wires into a Text-to-Speech task or the "Griptape Tool: Text to Speech" tool.

    Install and keys

    The pack itself - ComfyUI Manager, search "Griptape," install, or:

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

    It installs griptape[all] and python-dotenv. For the key, either set OPENAI_API_KEY in the environment or go to ComfyUI Settings → the Griptape section and paste it there - the pack reads both, and if it's already in your environment it'll show up automatically. Grab a key at https://platform.openai.com/api-keys.

    Where people get burned

    The most common miss: the driver is created, but there's no key anywhere, so the tool quietly fails or never produces audio. Verify the key name matches exactly what's in api_key_env_var. Also watch the dependency angle - this pack's griptape[all] install pulls in its own torch, which can clobber ComfyUI's CUDA build on Nvidia boxes. The README's fix is to reinstall torch:

    pip uninstall torch
    pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
    

    And if you ever see an ImportError about a driver from griptape.drivers, the pack isn't updated - run python -m pip install griptape -U and restart. It's the pack's most common non-torch failure and it's usually just a stale Griptape library.

    CategoryGriptape/Agent Drivers/Text to Speech

    Inputs (3)

    NameTypeDefaultDescription
    text_to_speech_modeloptCOMBOtts-1Enter the text-to-speech model name.
    voiceoptCOMBOalloySelect the voice for text-to-speech.
    api_key_env_varoptSTRINGOPENAI_API_KEYEnter the environment variable name for the API key, not the actual API key.

    Outputs (1)

    NameTypeDescription
    DRIVERTEXT_TO_SPEECH_DRIVER