ComfyUI > Nodes > ComfyUI 1hewNodes > Audio Duration

ComfyUI Node: Audio Duration

Class Name

1hew_AudioDuration

Category
1hewNodes/audio
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI 1hewNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 1hewNodes 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

Audio Duration Description

Calculates audio clip duration in seconds for synchronization and multimedia integration.

Audio Duration:

The 1hew_AudioDuration node is designed to calculate the duration of an audio clip in seconds. This node is particularly useful for AI artists and developers who need to determine the length of audio data for various applications, such as synchronization with visual media or audio processing tasks. By analyzing the waveform and sample rate of the audio input, the node provides an accurate measurement of the audio's duration. This functionality is essential for ensuring that audio clips are appropriately timed and can be seamlessly integrated into multimedia projects. The node's ability to handle audio data efficiently makes it a valuable tool for those working with audio in creative and technical fields.

Audio Duration Input Parameters:

audio

The audio parameter is a dictionary that contains the audio data to be processed. It is expected to include at least two key pieces of information: the waveform, which is the actual audio signal data, and the sample_rate, which indicates the number of samples per second in the audio. The waveform should be a multi-dimensional array representing the audio signal, while the sample rate is a float value. This parameter is crucial as it directly influences the calculation of the audio duration. If the audio data is not provided or is incorrectly formatted, the node will default to returning a duration of 0.0 seconds.

Audio Duration Output Parameters:

second

The second output parameter represents the calculated duration of the audio clip in seconds. This float value is derived from dividing the total number of samples in the waveform by the sample rate. The output is essential for understanding the length of the audio clip, which can be used for further processing or synchronization tasks. An accurate duration measurement ensures that audio can be effectively managed and utilized in various applications.

Audio Duration Usage Tips:

  • Ensure that the audio input parameter contains both a valid waveform and sample rate to obtain an accurate duration measurement.
  • Use this node to verify the length of audio clips before integrating them into multimedia projects to ensure proper synchronization with other media elements.

Audio Duration Common Errors and Solutions:

Invalid audio input

  • Explanation: The audio input is either missing or not formatted as a dictionary containing the necessary waveform and sample_rate keys.
  • Solution: Verify that the audio input is correctly structured as a dictionary with valid waveform data and a sample rate. Ensure that the waveform is a multi-dimensional array and the sample rate is a positive float value.

Zero or negative sample rate

  • Explanation: The sample rate provided in the audio input is zero or negative, which is not valid for calculating duration.
  • Solution: Check the audio input to ensure that the sample rate is a positive float value. Correct any errors in the audio data source that may have resulted in an incorrect sample rate.

Missing waveform data

  • Explanation: The waveform data is missing from the audio input, preventing the calculation of the audio duration.
  • Solution: Ensure that the audio input includes a valid waveform array. If the waveform data is missing, check the source of the audio data to ensure it is being correctly captured and passed to the node.

Audio Duration Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI 1hewNodes
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.

Audio Duration