Nodes/ComfyUI-Text2Speech/HttpTTSToAudio
ComfyUI Node

HttpTTSToAudio

Free neural TTS in one node

By GeekatplayStudio·Created 10 months ago·Updated 8 months ago· 2
HttpTTSToAudio
    • audio_path
    textHello from ComfyUI.
    languageen
    server_urlhttp://127.0.0.1:5002/tts
    text_file_path
    output_directory
    voice
    rate180
    volume1.00
    timeout_seconds300
    auto_timeouttrue

    You've built the video workflow. Now the character needs to talk, the tutorial needs a voiceover, the storyboard needs narration. That's what HttpTTSToAudio is for: it turns plain text into a spoken WAV file right inside your ComfyUI graph, using Microsoft Edge's neural voices. No API key, no GPU cost, no giant model download - just an internet connection and a small local server you start once. It ships from GeekatPlay Studio, a YouTube creator who publishes ComfyUI tutorial content, and it's clearly built to be demonstrated rather than just parked in a repo.

    What it actually does

    The name says "Http" for a reason - this node is an HTTP client, not a TTS engine. The real work happens in tts_server.py, a tiny Flask server that runs separately on http://127.0.0.1:5002. The node POSTs your text, voice, rate, and volume as JSON to /tts, the server synthesizes audio, and the node copies the resulting WAV into your ComfyUI output directory (or wherever you point it) with a timestamped, descriptive filename.

    Under the hood the server uses edge-tts, the Python library that talks to Microsoft Edge's free online TTS endpoint. It's unofficial and requires internet, but it's been the community's favorite free neural-voice hack for years. If Edge is unreachable, the server silently falls back to pyttsx3, which uses your OS's system voices - offline, but noticeably more robotic. That fallback is nice to have; just don't expect Neural quality from it.

    The inputs that matter

    • text - multiline, your actual words. The only thing you'll touch most runs.
    • voice - a 17-option dropdown of Edge Neural voices across US, GB, AU, CA, and IN English. Default is en-US-AriaNeural, which is a perfectly pleasant female voice. Names follow the en-US-GuyNeural pattern, so you can tell dialect and gender at a glance.
    • rate (50–400, default 180) and volume (0.0–1.0) - the server converts these to Edge's percentage format relative to the 180 baseline, so you get real control, not made-up numbers.
    • text_file_path and output_directory - file pickers. Leave the output directory blank and it lands in ComfyUI's default output folder, which is what you want 90% of the time.
    • timeout_seconds + auto_timeout - for long scripts. Leave auto_timeout on; it scales the request timeout with word count (roughly words ÷ 2.5 seconds, plus a buffer) so you don't get a false failure on a 2,000-word script.

    The output is a single audio_path STRING pointing at the WAV. That's the pack's own recommended wiring: feed it into VHS_LoadAudio's audio_file input, then out through WAS_SaveAudio. The pack's example workflow does exactly this, and it's the cleanest way to get generated speech into a video pipeline.

    Installing it - the part people miss

    Install is easy: ComfyUI Manager (search "ComfyUI-Text2Speech") or cd ComfyUI/custom_nodes && git clone https://github.com/GeekatplayStudio/ComfyUI-Text2Speech, then restart. Dependencies are light - edge-tts, pyttsx3, flask, requests - no torch, no model files. On the standalone Windows build you may need install.bat or pip with the embedded Python.

    Here's the trap: the node does nothing until the server is running. Start it with python tts_server.py (or double-click run_tts.bat on Windows) and leave it in its own terminal. You're now running two processes for one feature - slightly clunky, but it's also why the node is so fast.

    Troubleshooting

    • "Could not connect to TTS server" - the server isn't up. Start it, and make sure nothing else grabbed port 5002.
    • No audio - check your internet. Edge TTS is online-only; the pyttsx3 fallback kicks in but uses system voices.
    • Timeout on long text - keep auto_timeout on. For genuinely huge scripts (10k+ words) the README suggests splitting into chunks.

    Honestly, this isn't the best-sounding TTS in existence - F5-TTS and the new local diffusion models are better. But you don't want to babysit a 335M-parameter model inside every workflow just for narration. This is free, instant, and genuinely good enough for voiceovers, character lines, and accessibility. It's the one I'd reach for when I want speech without thinking about it.

    Categorygeekatplay/TTS

    Inputs (10)

    NameTypeDefaultDescription
    textSTRINGHello from ComfyUI.
    languageSTRINGen
    server_urlSTRINGhttp://127.0.0.1:5002/tts
    text_file_pathoptSTRING
    output_directoryoptSTRING
    voiceoptCOMBO17 options: en-US-AriaNeural, en-US-ZiraNeural, en-US-JennyNeural, en-US-GuyNeural, en-US-ChristopherNeural, en-US-EricNeural, +11
    rateoptINT18050–400
    volumeoptFLOAT1.000–1
    timeout_secondsoptINT30060–3600
    auto_timeoutoptBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    audio_pathSTRING