Visit ComfyUI Online for ready-to-use ComfyUI environment
Merge two audio inputs seamlessly, adjusting channels and sample rates for coherent output in ComfyUI.
The AudioConcatenate
node in ComfyUI is designed to seamlessly merge two audio inputs into a single output, ensuring that the resulting audio is coherent and maintains quality. This node is particularly useful for AI artists and audio engineers who need to combine audio tracks while managing differences in sample rates and channel configurations. The node intelligently handles channel adjustments, converting mono to stereo by duplicating channels and downmixing multi-channel audio to stereo through averaging. It also resamples audio inputs to the highest sample rate among them, ensuring consistency in playback speed and quality. This functionality is crucial for creating smooth transitions between audio segments, making it an essential tool for audio editing and production tasks.
audio_a
is the first audio input parameter, expected in the format {"waveform": torch.Tensor, "sample_rate": int}
. This parameter represents the initial audio segment to be concatenated. The waveform is a tensor that contains the audio data, while the sample rate is an integer indicating the number of samples per second. The sample rate of audio_a
will be compared with audio_b
to determine the final sample rate for the concatenated output. There are no specific minimum or maximum values for the waveform, but the sample rate should be a positive integer.
audio_b
is the second audio input parameter, also expected in the format {"waveform": torch.Tensor, "sample_rate": int}
. Similar to audio_a
, this parameter provides the audio data and its sample rate for the second segment to be concatenated. The node will resample audio_b
if its sample rate differs from the determined final sample rate. This ensures that both audio segments are aligned in terms of playback speed and quality. As with audio_a
, the waveform can vary in size, but the sample rate must be a positive integer.
The output parameter audio
is a dictionary in the format {"waveform": torch.Tensor, "sample_rate": int}
. This output contains the concatenated audio waveform and the sample rate used for the final audio. The waveform is a tensor that represents the combined audio data from audio_a
and audio_b
, adjusted for channel consistency and resampled to the highest sample rate of the inputs. The sample rate ensures that the output audio maintains the best possible quality and is ready for further processing or playback.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.