ComfyUI > Nodes > ComfyUI Fictiverse Nodes > Audio Duration

ComfyUI Node: Audio Duration

Class Name

Audio Duration

Category
Fictiverse/Audio
Author
Fictiverse (Account age: 1343days)
Extension
ComfyUI Fictiverse Nodes
Latest Updated
2026-04-26
Github Stars
0.02K

How to Install ComfyUI Fictiverse Nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI Fictiverse Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Fictiverse Nodes 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 file duration in milliseconds and seconds for precise timing and synchronization.

Audio Duration:

The Audio Duration node is designed to calculate the length of an audio file, providing you with both the duration in milliseconds and seconds. This node is particularly useful for AI artists and developers who need to understand the temporal characteristics of audio data, whether for synchronization with visual elements, audio processing, or other creative applications. By leveraging the waveform and sample rate of the audio input, the node accurately computes the duration, allowing you to make informed decisions based on the length of the audio content. This functionality is essential for tasks that require precise timing and duration management, enhancing your ability to work with audio in a more structured and efficient manner.

Audio Duration Input Parameters:

audio

The audio parameter is the sole input for this node and is expected to be an audio object containing two key components: the waveform and the sample rate. The waveform represents the audio signal data, while the sample rate indicates the number of samples per second. This parameter is crucial as it provides the raw data needed for the node to calculate the audio duration. There are no specific minimum, maximum, or default values for this parameter, as it depends on the audio file you are working with. The accuracy of the duration calculation is directly influenced by the quality and properties of the audio input.

Audio Duration Output Parameters:

duration_ms

The duration_ms output provides the duration of the audio in milliseconds. This output is particularly useful when you need a high-resolution time measurement for tasks that require precise timing, such as syncing audio with video frames or other time-sensitive applications. Understanding the duration in milliseconds allows for fine-grained control over audio processing and manipulation.

duration_sec

The duration_sec output gives the duration of the audio in seconds. This output is beneficial for general purposes where a broader time scale is sufficient, such as determining the overall length of an audio track or for use in applications where second-level precision is adequate. It provides a more human-readable format for understanding the length of the audio content.

Audio Duration Usage Tips:

  • Ensure that the audio input is correctly formatted with both waveform and sample rate data to achieve accurate duration calculations.
  • Use the duration_ms output for applications requiring precise timing, such as audio-visual synchronization, and the duration_sec output for more general timing needs.

Audio Duration Common Errors and Solutions:

AudioTrim: Start time must be less than end time and be within the audio length.

  • Explanation: This error occurs when the start time specified for trimming the audio is greater than or equal to the end time, or if it falls outside the actual length of the audio.
  • Solution: Verify that the start time is less than the end time and that both are within the bounds of the audio's total duration. Adjust the start and end times accordingly to ensure they are valid.

Audio Duration Related Nodes

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