ComfyUI > Nodes > Comfyui-HunyuanFoley > Select Audio From Batch

ComfyUI Node: Select Audio From Batch

Class Name

SelectAudioFromBatch

Category
audio/utils
Author
aistudynow (Account age: 108days)
Extension
Comfyui-HunyuanFoley
Latest Updated
2025-09-13
Github Stars
0.06K

How to Install Comfyui-HunyuanFoley

Install this extension via the ComfyUI Manager by searching for Comfyui-HunyuanFoley
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Comfyui-HunyuanFoley 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Select Audio From Batch Description

Efficiently extract specific audio waveform from batch data for precise sample selection and manipulation.

Select Audio From Batch:

The SelectAudioFromBatch node is designed to efficiently extract a specific audio waveform from a batch of audio data. This node is particularly useful when working with large datasets of audio waveforms, allowing you to pinpoint and select a single audio sample based on its position within the batch. By providing a straightforward method to access individual audio samples, this node simplifies the process of handling and manipulating audio data in batch form. It ensures that even if the specified index is out of bounds, the node will gracefully handle the situation by selecting the last available audio sample, thus preventing errors and ensuring smooth operation. This functionality is essential for tasks that require precise audio sample selection, such as audio analysis, processing, or synthesis.

Select Audio From Batch Input Parameters:

audio_batch

The audio_batch parameter is an audio object that contains a collection of waveforms. This parameter serves as the source from which a specific audio sample will be selected. It is crucial for the node's operation as it provides the data set from which the selection is made. The audio batch is expected to be structured in a way that includes both the waveform data and the sample rate, ensuring that the selected audio can be processed or used in subsequent operations.

index

The index parameter is an integer that specifies the 0-based position of the audio sample to be selected from the batch. This parameter allows you to choose which specific audio waveform you want to extract from the batch. The index has a default value of 0, with a minimum value of 0 and a maximum value of 63. If the provided index exceeds the number of available samples in the batch, the node will automatically select the last sample, ensuring that the operation does not result in an error.

Select Audio From Batch Output Parameters:

AUDIO

The output of the SelectAudioFromBatch node is an audio object in the standard AUDIO dictionary format. This output contains the selected waveform and its associated sample rate, packaged in a way that is compatible with other nodes that process audio data. The output ensures that the selected audio sample is ready for further processing or analysis, maintaining the integrity and quality of the original audio data.

Select Audio From Batch Usage Tips:

  • Ensure that the index parameter is set correctly to select the desired audio sample from the batch. If you are unsure of the batch size, consider using a dynamic approach to determine the appropriate index.
  • Use the SelectAudioFromBatch node in conjunction with other audio processing nodes to streamline workflows that involve batch audio data, such as audio feature extraction or transformation tasks.

Select Audio From Batch Common Errors and Solutions:

Index {index} is out of bounds for audio batch of size {waveform_batch.shape[0]}. Clamping to last item.

  • Explanation: This error occurs when the specified index exceeds the number of available audio samples in the batch.
  • Solution: Ensure that the index is within the valid range of the batch size. If you frequently encounter this error, consider implementing a check to adjust the index dynamically based on the batch size.

Select Audio From Batch Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-HunyuanFoley
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.