Nodes/RunningHub/RH Text to Audio
ComfyUI Node

RH Text to Audio

RH Text to Audio is the pack's one voice — a cloud TTS node that returns real audio

By liangzheng1128·Created 3 months ago·Updated 3 months ago· 0
RH Text to Audio
    • audio
    • audio_url
    text
    api_key
    base_urlhttps://www.runninghub.cn
    workflow_id
    timeout300

    Audio is the pack's quiet corner. While the image and video nodes are all about big generation jobs, RH Text to Audio is a simple text-to-speech call: text in, and it runs a TTS workflow on RunningHub's cloud, waits, and hands back real audio - loaded into ComfyUI's native AUDIO format so you can wire it straight into a video's soundtrack, a save node, or anything else that accepts AUDIO.

    The KB's audio essay makes the point that best-in-class TTS lives behind APIs, and this node is that pattern wearing the pack's clothes: you get the convenience of a hosted voice without installing a local TTS stack, which is genuinely nice for the "my video needs narration" job.

    The fields that matter

    Required:

    • text - what you want spoken (multiline).
    • api_key, base_url, workflow_id - credentials and the text-to-audio workflow. The usual .cn default, .ai for international.

    Optional:

    • timeout (300s default) - the cloud-wait budget.

    Outputs:

    • audio (AUDIO) - a ComfyUI audio dict with waveform and sample_rate, loaded from the downloaded file via torchaudio. This is the output you actually wire onward.
    • audio_url (STRING) - the remote URL, as a fallback and a reference.

    The mechanics and one quiet trap

    The node submits the task, polls /task/openapi/outputs until it finds an audio result, downloads it, and decodes it with torchaudio into ComfyUI's AUDIO structure. That decode step is where the quiet trap lives: if torchaudio isn't importable, the node returns None for audio and only the URL survives. It logs a warning and moves on, but you get a dead audio socket and no crash - so if your audio output suddenly shows nothing, check that torchaudio is actually installed in your ComfyUI environment. (It usually is, since ComfyUI ships with it, but it's the kind of thing that breaks on a stripped-down install.)

    Missing key or workflow ID returns None audio plus an error string in audio_url. And the hardcoded node ID makes its standard appearance: nodeId "6" for the text field, so this node assumes your TTS workflow's text node is 6. Stock RunningHub templates usually match; hand-built ones may silently ignore your text.

    Where it fits

    The natural chain is text → this node → a Save Audio node, or feed the AUDIO into a video workflow that needs a soundtrack. It's the least "cloud" of the Model nodes in feel - one call, one file, done - but the same caveats apply: metered credits, your text leaves the machine, and the platform's content filter sits between your prompt and the voice. If you need cloned or very specific voices, you'll outgrow this quickly and go straight to a dedicated TTS service; for a plain, reliable narration voice inside your graph, it does the job with zero local setup.

    Install

    cd ComfyUI/custom_nodes/
    git clone https://github.com/liangzheng1128/ComfyUI-RunningHub
    cd ComfyUI-RunningHub
    pip install -r requirements.txt
    

    or ComfyUI Manager → search "RunningHub", restart. The pack's deps are light - requests, websocket-client, Pillow, numpy - and the torchaudio piece comes from ComfyUI itself.

    CategoryRunningHub/Model

    Inputs (5)

    NameTypeDefaultDescription
    textSTRINGText to convert to audio
    api_keySTRING
    base_urlSTRINGhttps://www.runninghub.cn
    workflow_idSTRINGRunningHub workflow ID for text-to-audio
    timeoutoptINT3001–9999999

    Outputs (2)

    NameTypeDescription
    audioAUDIO
    audio_urlSTRING