Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently save TTS-generated audio with format options and quality control for AI projects.
The IndexTTS2SaveAudio node is designed to facilitate the process of saving audio data generated by text-to-speech (TTS) systems. This node is particularly useful for AI artists and developers working with audio synthesis, as it provides a streamlined method to convert audio waveforms into various file formats, such as WAV or MP3, while ensuring the audio quality is maintained through optional normalization. The node's primary function is to handle audio data efficiently, allowing users to specify parameters like file format and normalization options, which can significantly impact the final audio output's quality and size. By leveraging this node, you can easily manage and store audio outputs from TTS systems, making it an essential tool for projects that require high-quality audio synthesis and storage.
The audio parameter represents the audio data to be saved. It is expected to be a dictionary containing the waveform and sample rate. The waveform should be a NumPy array or a PyTorch tensor, and the sample rate should be an integer. This parameter is crucial as it forms the basis of the audio file that will be saved. The waveform data should be in a format that the node can process, typically with a shape of (B, C, N), where B is the batch size, C is the number of channels, and N is the number of samples.
The name parameter specifies the prefix for the saved audio file's name. It is a string that allows you to identify the audio file easily. If not provided, a default prefix "tts2" is used. This parameter helps in organizing and managing multiple audio files by providing a meaningful naming convention.
The format parameter determines the file format in which the audio will be saved. Common options include "wav" and "mp3". This parameter is important as it affects the compatibility and quality of the audio file. Choosing the right format depends on the intended use of the audio file, with WAV being uncompressed and high-quality, while MP3 offers compression and smaller file sizes.
The normalize_peak parameter is a boolean that indicates whether the audio should be peak-normalized. When set to true, the audio waveform is adjusted to ensure that its peak amplitude is at a specified level, typically just below the maximum possible value. This helps in preventing clipping and maintaining consistent audio levels across different files.
The wav_pcm parameter specifies the PCM format for WAV files, with "pcm16" being a common option. This parameter is relevant when saving audio in WAV format, as it determines the bit depth of the audio file, affecting both its quality and size. PCM16 is a standard choice for high-quality audio.
The mp3_bitrate parameter sets the bitrate for MP3 files, with "320k" being a typical value for high-quality audio. This parameter is crucial for balancing audio quality and file size when saving in MP3 format. Higher bitrates result in better audio quality but larger file sizes.
The paths parameter is a list of strings representing the file paths where the audio files have been saved. This output is important as it provides you with the exact locations of the saved audio files, allowing for easy access and further processing or sharing of the audio data.
audio parameter contains valid waveform and sample rate data to avoid errors during processing.normalize_peak option to maintain consistent audio levels across different files, especially when dealing with varying input audio sources.format parameter based on your needs for audio quality and file size; WAV for high quality and MP3 for smaller file sizes.audio parameter is a dictionary with a valid sample rate and waveform data, and that the waveform is a NumPy array or PyTorch tensor.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.