FireRedAudio 朗读文本规范化 · T8star-Aix
The node that fixes how the TTS *says* your numbers, dates, and acronyms
- script_plan
- 规范化脚本计划
- 原文/朗读文本对照 JSON
- 发生变化的 line ID
- 规范化报告
You write "API" and the TTS reads it as the word "api". You write "2026年8月30日" and it mangles the date. You type a number and it reads it as a serial number when you meant a quantity. TextNormalizer is the fix, and it's built the honest way: it generates the actual spoken text that goes into TTS without losing the original. The output ScriptPlan keeps your source_text intact, adds the text that will be read aloud, records every rule that fired in normalization, and gives you a side-by-side comparison so you can see exactly what changed before you commit a batch. It sits between ScriptParser and BatchDubbing and quietly prevents the most embarrassing TTS errors.
How it works
It takes a script_plan (from ScriptParser) and runs each line through four transformation groups:
replacement_dictionary_json- your custom dictionary as a JSON object ({"API": "A P I"}). Matches are longest-first, so a specific entry beats a generic one. This is the escape hatch for acronyms, product names, and anything the model misreads.normalize_unicode- unifies full-width/compatibility characters so "A" and "A" don't confuse the tokenizer.normalize_whitespace- cleans stray whitespace and spaces before punctuation.expand_zh_dates- expands Chinese dates into the natural spoken form. On by default.expand_zh_numbers- expands Chinese numerals to words. Off by default, deliberately: model numbers, IDs and proper nouns often need a specific reading, and the README warns that blanket number expansion can change those readings. Flip it on only after you've eyeballed the comparison.
Outputs: 规范化脚本计划 (feed to BatchDubbing), 原文/朗读文本对照 JSON (the review artifact - check this), 发生变化的 line ID (which lines were touched), and 规范化报告. The input script object is never rewritten.
Where it fits
In the production chain it slots in between the parser and the dubbing: 音色库 → ScriptParser → this → 可恢复批量配音. The README is explicit about the discipline: check the original/spoken comparison before wiring it to BatchDubbing, because the point of the two-track design is that you see what will be read before you spend GPU on it. It's also the first place to look when a finished line reads a number wrong - the fix is a dictionary entry, not a re-roll of the seed.
Installing
Pack-wide install (ComfyUI Manager search comfyui-fireredaudio-T8, or clone + python scripts\setup_runtime.py). No model needed - pure text logic, runs instantly. The gotcha is dictionary hygiene: entries are matched longest-first, so watch for overlapping keys ("API" vs "API网关" need distinct, correctly-ordered entries), and remember that expand_zh_numbers stays off until you've confirmed the reading. Everything else - unicode, whitespace, dates - is safe to leave at its default on.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| script_plan | T8_FIREREDAUDIO_SCRIPT_PLAN | — | |
| replacement_dictionary_json | STRING | {} | — |
| normalize_unicode | BOOLEAN | true | — |
| normalize_whitespace | BOOLEAN | true | — |
| expand_zh_dates | BOOLEAN | true | — |
| expand_zh_numbers | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| 规范化脚本计划 | T8_FIREREDAUDIO_SCRIPT_PLAN | — |
| 原文/朗读文本对照 JSON | STRING | — |
| 发生变化的 line ID | STRING | — |
| 规范化报告 | STRING | — |