Nodes/TTS Audio Suite/๐Ÿ“ Phoneme Text Normalizer
ComfyUI Node

๐Ÿ“ Phoneme Text Normalizer

Fix mangled pronunciation before it reaches your TTS engine

By diodiogodยทCreated 12 months agoยทUpdated 18 days agoยท 1,098
๐Ÿ“ Phoneme Text Normalizer
    • normalized_text
    โ—„textEnter your text here. Examples: Polish: Czeล›ฤ‡, jak siฤ™ masz? German: Schรถne GrรผรŸe aus Mรผnchen! French: Bonjour, comment allez-vous?โ–บ
    โ—„methodUnicode Decompositionโ–บ
    โ—„languageAuto-detectโ–บ
    โ—„show_debugtrueโ–บ

    TTS models mispronounce accented and non-English text all the time. Feed F5-TTS a Polish sentence full of ล›, ลผ, ล‚ or a German GrรผรŸe and it often stumbles on characters it wasn't really trained to read. This node sits before your TTS engine and cleans the text up first - either by simplifying tricky characters or by converting the whole thing to phonemes the model can pronounce reliably. It's text-in, text-out; the audio engine never sees the messy original.

    Fair warning the author gives, and it's worth repeating: this is an experimental feature. It helps in a lot of cases, but "test with your target language" is genuinely the advice - results vary by language and engine.

    How it works

    You pick a method and it transforms the text accordingly. The interesting mode is IPA Phonemization, which uses espeak to rewrite your text as International Phonetic Alphabet symbols - an unambiguous "here's exactly how to say it" representation. The lighter modes just normalize awkward characters (splitting accents off letters, or mapping to plain ASCII) without going full phonetic.

    The inputs and outputs that matter

    • text (STRING) - the text to clean. Wire it in ahead of your TTS Text node, or type directly.
    • method - the four modes, in rough order of aggressiveness:
      • Pass-through - no change (a bypass for A/B testing).
      • Unicode Decomposition - splits special characters into base letter + diacritic. Gentle, safe.
      • IPA Phonemization - full phonetic conversion via espeak. The strongest fix, and the one that needs espeak installed.
      • Character Mapping - ASCII fallback for maximum compatibility when a model really only wants plain letters.
    • language (default Auto-detect, plus ~15 named languages) - leave it on Auto-detect and it guesses from the character patterns; set it explicitly if the guess is wrong for short or mixed text.
    • show_debug (default on) - prints what it did, so you can see the before/after. Handy while dialing this in.

    The single output is normalized_text (STRING) - connect it into the text input of your TTS engine.

    How to install it

    Comes with TTS Audio Suite. ComfyUI Manager: search TTS Audio Suite, install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/diodiogod/TTS-Audio-Suite.git
    cd TTS-Audio-Suite
    python install.py
    

    then restart. For the IPA Phonemization mode specifically you need espeak available: on Linux/Mac that's the phonemizer package plus system espeak, and on Windows the suite uses espeak-phonemizer-windows. The pack's installer handles the Python side; if IPA mode errors, a missing system espeak is the usual culprit.

    Common issues & troubleshooting

    IPA mode errors or does nothing. espeak isn't wired up. On Linux install system espeak (sudo apt-get install espeak-ng) so the phonemizer has a backend; the other three methods don't need it, so use Unicode Decomposition as a fallback.

    Pronunciation got worse, not better. It happens - this is experimental, and phonemizing text an engine already handled fine can hurt. A/B it: run the same line through Pass-through vs your chosen method and keep whichever sounds right. Not every language/engine combo benefits.

    Auto-detect picked the wrong language. On short snippets or mixed text the detector can miss. Set language explicitly instead of relying on Auto-detect.

    It's compatible with which engines? Since it just outputs plain text, it works ahead of any TTS engine in the suite - F5-TTS, ChatterBox, and the rest. It's most useful for the phonetically-tricky European languages in F5-TTS.

    CategoryTTS Audio Suite/Text

    Inputs (4)

    NameTypeDefaultDescription
    textSTRINGEnter your text here. Examples: Polish: Czeล›ฤ‡, jak siฤ™ masz? German: Schรถne GrรผรŸe aus Mรผnchen! French: Bonjour, comment allez-vous?Input text to normalize for TTS processing. Supports multilingual text with special characters like: โ€ข Polish: ฤ…, ฤ‡, ฤ™, ล‚, ล„, รณ, ล›, ลบ, ลผ โ€ข German: รค, รถ, รผ, รŸ โ€ข French: ร , รฉ, รช, รง, etc. โ€ข And many other languages Connect this to any TTS engine for improved pronunciation.
    methodCOMBOUnicode DecompositionText processing method to apply: โ€ข Pass-through: No processing (original text) โ€ข Unicode Decomposition: ฤ…โ†’aฬง, ฤ‡โ†’ฤ‡ (recommended for most cases) โ€ข IPA Phonemization: Full phonetic conversion (ฤ…โ†’ษ”ฬƒ, requires espeak) โ€ข Character Mapping: ASCII fallback (ฤ…โ†’a, ฤ‡โ†’c) Start with Unicode Decomposition - it fixes most pronunciation issues.
    languageCOMBOAuto-detectLanguage for processing (affects IPA Phonemization): โ€ข Auto-detect: Automatically detects language from text โ€ข Manual selection: Choose specific language for better accuracy Language detection looks for special characters: โ€ข Polish: ฤ…, ฤ™, ฤ‡, ล‚, etc. โ€ข German: รค, รถ, รผ, รŸ โ€ข French: ร , รฉ, รช, รง, etc. Only affects IPA Phonemization method.
    show_debugBOOLEANtrueShow debug information in console: โ€ข Original vs normalized text comparison โ€ข Character-by-character changes โ€ข Detected language (when auto-detecting) โ€ข Processing method used Helpful for testing which method works best for your language. Disable for cleaner console output in production.

    Outputs (1)

    NameTypeDescription
    normalized_textSTRINGโ€”