ComfyUI  >  Nodes  >  CosyVoice-ComfyUI >  TextNode

ComfyUI Node: TextNode

Class Name

TextNode

Category
AIFSH_CosyVoice
Author
AIFSH (Account age: 260 days)
Extension
CosyVoice-ComfyUI
Latest Updated
7/23/2024
Github Stars
0.1K

How to Install CosyVoice-ComfyUI

Install this extension via the ComfyUI Manager by searching for  CosyVoice-ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter CosyVoice-ComfyUI in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

TextNode Description

Text normalization for natural language processing, including digit-to-word conversion and multilingual support.

TextNode:

The TextNode is designed to process and normalize text data, making it suitable for various natural language processing tasks. This node is particularly useful for converting numerical digits into words, cleaning and normalizing text, and handling multilingual text normalization. It ensures that the text is in a consistent format, which is essential for downstream tasks such as text-to-speech, machine translation, or any other AI-driven text analysis. By leveraging different normalization techniques, the TextNode helps in maintaining the integrity and readability of the text, making it a crucial component in any text processing pipeline.

TextNode Input Parameters:

text

The text parameter is the primary input for the TextNode, representing the raw text that needs to be processed. This parameter accepts a string of text which can include numerical digits, punctuation, and multilingual characters. The function of this parameter is to provide the text that will undergo normalization and cleaning processes. There are no specific minimum or maximum values for this parameter, but it should be a valid string. The default value is an empty string.

inflect_parser

The inflect_parser parameter is used to convert numerical digits within the text into their corresponding word forms. This parameter is essential for ensuring that numbers are represented consistently in the text. The function of this parameter is to facilitate the conversion of digits to words, which is particularly useful for text-to-speech applications. There are no specific minimum or maximum values for this parameter, but it should be an instance of a parser capable of handling number-to-word conversion. The default value is None.

cleaner_names

The cleaner_names parameter is a list of cleaner functions that will be applied to the text. Each cleaner function is responsible for a specific type of text normalization, such as removing unwanted characters or converting text to a standard format. The function of this parameter is to specify the sequence of cleaning operations that will be performed on the text. There are no specific minimum or maximum values for this parameter, but it should be a list of valid cleaner function names. The default value is an empty list.

TextNode Output Parameters:

normalized_text

The normalized_text parameter is the primary output of the TextNode, representing the cleaned and normalized version of the input text. This output is crucial for ensuring that the text is in a consistent and readable format, suitable for further processing or analysis. The function of this parameter is to provide the final, processed text after all normalization and cleaning operations have been applied. The output is a string that reflects the normalized version of the input text.

TextNode Usage Tips:

  • Ensure that the text input is a valid string to avoid any processing errors.
  • Use the inflect_parser parameter to convert numerical digits into words for better readability and consistency.
  • Specify a list of cleaner functions in the cleaner_names parameter to apply multiple cleaning operations in sequence.
  • Verify the output normalized_text to ensure that the text has been processed as expected.

TextNode Common Errors and Solutions:

"Unknown cleaner: %s"

  • Explanation: This error occurs when a specified cleaner function in the cleaner_names parameter is not recognized.
  • Solution: Ensure that all cleaner function names in the cleaner_names parameter are valid and correctly spelled.

"Invalid text input"

  • Explanation: This error occurs when the text parameter is not a valid string.
  • Solution: Ensure that the text parameter is a valid string before passing it to the TextNode.

"Inflect parser not provided"

  • Explanation: This error occurs when the inflect_parser parameter is not provided or is None.
  • Solution: Provide a valid inflect parser instance to the inflect_parser parameter to enable number-to-word conversion.

TextNode Related Nodes

Go back to the extension to check out more related nodes.
CosyVoice-ComfyUI
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.