AudioConcatenate
This node technically takes two audio dictionaries containing waveform data and sampling rates as inputs
Audio Concatenate
The AudioConcatenate node technically receives two audio dictionaries containing waveform data and sample rates as inputs.
The AudioConcatenate node is an audio processing tool whose core function is to concatenate two audio segments into a longer audio clip. It allows users to specify the order of concatenation, providing flexibility in combining audio materials.
Node Functionality
This node technically receives two audio dictionaries containing waveform data and sample rates as inputs. It first checks if the sample rates of the two audio inputs are consistent; if not, an error will be reported. After confirming that the sample rates match, the node uses PyTorch's torch.cat function to concatenate the waveform data along the width dimension according to the user-selected direction, ultimately outputting a new audio dictionary containing the concatenated waveform and the original sample rate.
Node Parameter Description - AudioConcatenate
Connection Inputs
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
audio1 | AUDIO | Yes | - | - | : Input the first audio data to be concatenated. |
audio2 | AUDIO | Yes | - | - | : Input the second audio data to be concatenated. |
Control Parameters
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
direction | COMBO | Yes | right | "right", "left" | : Controls the concatenation order of the two audio segments. Options are "right" (audio1 first, audio2 second) or "left" (audio2 first, audio1 second). |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| AUDIO | AUDIO | : Outputs the newly concatenated audio data. |
Usage Scenarios
In workflows for creating audiobooks or podcasts, you can use this node to sequentially concatenate multiple recorded chapters or segments. For example, by using the opening music as audio1 and the narration content as audio2, and selecting the "right" direction, you can generate a complete audio segment with opening music.
Notes
Please note that this node requires the two input audio segments to have the same sample rate; otherwise, processing cannot proceed. The concatenation operation is performed only along the time dimension and does not involve any mixing or overlapping of the audio content.
AudioConcatenate Node Source Code Link
The AudioConcatenate node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.