ComfyUI Node

千问TTS

The pack's plain-vanilla cloud voice node

By mailzwj·Created about a year ago·Updated 12 months ago· 5
千问TTS
    • 音频
    • 采样率
    model_idqwen-tts-latest
    content你好,千问!
    voiceSunny

    QwenTTS (千问TTS) is the original node in the mailzwj/ComfyUI-Qwen-TTS pack, and it is deliberately boring in the best way. Text in, speech out, nothing else to fiddle with. It calls Alibaba's qwen-tts model over the DashScope (Bailian) API - no local weights, no VRAM, no model files to babysit - which makes it the exact right tool for the job where a local model is overkill: you need a clean voiceover for a video and you'd rather not install a 1B-parameter TTS and its transformer-version landmines just to say "hello."

    Know what you're getting, though: this is the API node, not the open-weights one. There's a second pack called ComfyUI-Qwen-TTS (by flybirdxx) that runs Alibaba's open Qwen3-TTS weights on your own machine. If the local model is what you wanted, you've come to the wrong GitHub owner. This one is a network wrapper: it needs a Bailian API key, bills per character, and your GPU stays dark the whole time. Check the repo URL before you install.

    How it works

    The mechanics are short and readable. On run, it hands your text to dashscope.audio.qwen_tts.SpeechSynthesizer.call() with a model_id, voice, and your key from config.json. The API returns a URL to a freshly generated audio file; the node downloads it, decodes it with torchaudio, and hands ComfyUI a standard {"waveform", "sample_rate"} audio dict. That's it - a requests.get() around an API call is the whole engine. It's the audio-generation sibling of a pattern the KB frames as "when local isn't the answer": you're paying for reliability and convenience, not for compute.

    The inputs that matter

    Three required inputs, and only two are really yours:

    • content - the text to speak, a multiline box. The default is "你好,千问!" but any text works; wire it from a prompt or caption node if you like.
    • voice - 7 choices: Cherry, Serena, Ethan, Chelsie, Dylan, Jada, Sunny. These are the same generic English-named voices Alibaba ships across the qwen-tts line - no regional dialect flavors here (that's the newer Qwen3TTS node's party trick).
    • model_id - a dropdown of four: qwen-tts-latest, two dated snapshots (2025-05-22, 2025-04-10), and the bare qwen-tts. The default comes from your config.json's default_model, and honestly "latest" is where you leave it. The dated pins exist for reproducibility if you ever need a workflow to behave identically a year from now.

    Notice what's not here: no language parameter. Qwen-TTS figures out the language from the text itself. For the multilingual crowd, the Qwen3TTS node in the same pack is the one with the explicit 10-language dropdown.

    Outputs and where they go

    • 音频 (AUDIO) - the waveform dict; feed it to a save-audio or audio-preview node.
    • 采样率 (INT) - the sample rate as a number, for anything downstream that needs to know it.

    Two outputs, both make sense, nothing exotic.

    Installing it

    The README's path:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mailzwj/ComfyUI-Qwen-TTS.git
    cd ComfyUI-Qwen-TTS
    pip install -r requirements.txt
    

    That pulls dashscope and requests - the pack's entire dependency footprint, which is refreshingly small. Manager can install it too if you search the pack title. Restart ComfyUI and grab the node from right-click → New Node → Qwen → 千问TTS.

    Configuring the key

    Edit ComfyUI-Qwen-TTS/config.json and swap the placeholder for a real key from the Bailian console:

    { "bailian_api_key": "sk-xxxxxxxx", "default_model": "qwen-tts-latest" }
    

    This is the step that makes or breaks you. The pack refuses to even load without a key - it raises ValueError at import, so the node just doesn't show up in your menu. The good news: the key lives in config.json, not in the workflow, so sharing a workflow never leaks it. Don't commit that file anywhere.

    Where people get burned

    • The node never appears in the menu. Almost always the missing-key ValueError. Check config.json, restart.
    • "It needs a network connection" - the README says so literally. This is a cloud call; no internet, no speech. Nothing to fix except your connectivity.
    • Wrong clone. If you wanted the local open-weights Qwen3-TTS and instead got an API-key prompt, you installed mailzwj's wrapper instead of flybirdxx's pack. Same name, different product.

    One last thing, because the KB is insistent about it and it's earned: an API node that carries a credential and phones home by design is exactly the shape of software that's been weaponized in this ecosystem before. This one is a small, readable file you can skim in a minute - fine. But when a convenience node asks for your key, the correct reaction is to read it before running it.

    CategoryQwen

    Inputs (3)

    NameTypeDefaultDescription
    model_idCOMBOqwen-tts-latest4 options: qwen-tts-latest, qwen-tts-2025-05-22, qwen-tts-2025-04-10, qwen-tts
    contentSTRING你好,千问!
    voiceCOMBOSunny7 options: Cherry, Serena, Ethan, Chelsie, Dylan, Jada, +1

    Outputs (2)

    NameTypeDescription
    音频AUDIO
    采样率INT