Nodes/comfyui-chinese-converter/Simplified to Traditional Chinese
ComfyUI Node

Simplified to Traditional Chinese

Your TTS Can't Read Traditional Chinese — Convert It Before It Reaches the Model

By MylanChan·Created 12 months ago·Updated 12 months ago· 2
Simplified to Traditional Chinese
    • text
    text

    Most open TTS models are trained on a lot more simplified Chinese than traditional. Feed one of them a script written in traditional characters and you get back mangled pronunciation or text that reads like a lorem-ipsum bot had a stroke. This node is the two-second fix: it takes a text string in simplified, hands you the same string in traditional - no, wait, the other way. SimplifiedToTraditional takes simplified input and emits traditional output, which is exactly the case the pack author built this for: the README says the whole point is TTS models that don't support traditional Chinese. If your script is already traditional but the model still chokes, that's the twin node TraditionalToSimplified - this one goes simplified → traditional.

    What it actually is

    This is one of two nodes in the tiny MylanChan/comfyui-chinese-converter pack (the other is the reverse direction). There's no GPU, no model file, no API call, no key. It's a text-in, text-out pass-through that sits in your graph and mutates a string. The whole pack exists to solve one annoying real-world gap in TTS workflows, and it solves it offline.

    How it works

    Under the hood it wraps OpenCC, the same library that powers Chinese↔Chinese conversion on Wikipedia and macOS input methods - i.e. the standard, not some hobby parser. The node instantiates it with the s2t (simplified-to-traditional) config and calls convert() on your string.

    Two details worth knowing. First, OpenCC is phrase-aware, not character-by-character: it'll turn 计算机 into 電腦 as a unit rather than rendering a nonsense hybrid. Second, the pack depends on opencc-python-reimplemented - a pure-Python port of OpenCC, not the C++ binding - so install is painless and there are zero model downloads. The converter object is created lazily and cached on the node, and the node's IS_CHANGED hooks on the text hash, so it reruns exactly when your text changes and not a moment before.

    Inputs and outputs

    The whole interface is one field, and that's the whole point:

    • text (STRING, multiline required) - paste your simplified-Chinese script, or wire it in from wherever text originates in your workflow.

    And one output:

    • text (STRING) - the same content in traditional characters, ready to fan out to whatever wants it.

    In an image-gen graph that means wiring it into a CLIP Text Encode prompt; in a TTS graph it feeds the model's text input (the same STRING socket most audio packs use). Since it's a plain typed string output, you can also tap it into a Save Text node or chain it into more plumbing - ComfyUI treats strings like any other value that can fan out from a single socket.

    Installing it

    Easiest: ComfyUI Manager → search comfyui-chinese-converter → install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MylanChan/comfyui-chinese-converter
    cd comfyui-chinese-converter
    pip install -r requirements.txt
    

    Then restart ComfyUI. The only dependency is the OpenCC port above, so there's no heavy runtime to babysit.

    Where people get burned

    • Version conflicts with OpenCC. The README's own warning: if the node doesn't work, check whether another pack pulled in a conflicting opencc build. Audio node packs are notorious for dependency collisions - the KB's TTS essay calls dependency conflict the default failure mode in that corner of ComfyUI. If you see an import error mentioning opencc, uninstall the stragglers and reinstall cleanly.
    • Rare characters won't convert. OpenCC works from predefined dictionaries; the README is upfront that uncommon hanzi can slip through unchanged. It's a converter, not a translator - don't expect it to fix characters the dictionaries never saw.

    For a script that's mostly standard characters - which is 99% of real TTS scripts - this node is a boring, reliable, offline way to stop your voice model from reading 中文 like it's 1979. It's the one I'd reach for before any API-based "translation" detour.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING