ComfyUI > Nodes > WhatDreamsCost-ComfyUI > Speech Length Calculator

ComfyUI Node: Speech Length Calculator

Class Name

SpeechLengthCalculator

Category
text/speech
Author
WhatDreamsCost (Account age: 282days)
Extension
WhatDreamsCost-ComfyUI
Latest Updated
2026-03-26
Github Stars
0.13K

How to Install WhatDreamsCost-ComfyUI

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

Speech Length Calculator Description

Estimates spoken text duration in video frames for syncing speech with visuals at varied speeds.

Speech Length Calculator:

The SpeechLengthCalculator is a specialized node designed to estimate the duration of spoken text in terms of video frames. This node is particularly useful for creators who need to synchronize speech with visual content, such as in animations or video productions. By analyzing the text input, it calculates the number of frames required to deliver the speech at different speaking speeds: slow, average, and fast. This allows you to plan and adjust your visual content to match the timing of the spoken words accurately. The node's primary function is to parse the text for quoted speech, count the words, and then compute the frame count based on the specified frames per second (fps) and optional additional time. This ensures that your audio-visual projects maintain a seamless and professional flow.

Speech Length Calculator Input Parameters:

text

This parameter is a string input where you can enter the script or dialogue that you want to analyze. It supports multiline text and defaults to a prompt encouraging you to enclose spoken words in quotes. The text parameter is crucial as it forms the basis for calculating the speech length by identifying and counting the words within quotes. There is no explicit minimum or maximum length for this input, but it should be a valid string.

fps

The fps parameter stands for frames per second and is an integer input that determines the frame rate of your video content. It defaults to 24, with a minimum value of 1 and a maximum of 120. This parameter is essential because it directly influences the calculation of the frame count for the speech duration. A higher fps value will result in more frames for the same duration of speech, affecting the synchronization with visual elements.

additional_time

This is a float input that allows you to add extra time to the calculated speech duration, measured in seconds. It defaults to 0.0 and has a minimum value of 0.0. This parameter is useful for adding pauses or additional timing considerations to your speech, ensuring that the calculated frame count aligns perfectly with your creative needs.

text_input

The text_input parameter is an optional string input that, if provided, takes precedence over the text parameter. It is designed to force the use of a specific text input, which can be useful in scenarios where the text is dynamically generated or sourced from another node. This ensures flexibility and adaptability in your workflow.

Speech Length Calculator Output Parameters:

slow_frame_count

This output represents the number of frames required to deliver the speech at a slow speaking speed, calculated at 100 words per minute. It provides a frame count that can be used to synchronize slower-paced speech with visual content, offering a more deliberate and measured delivery.

average_frame_count

The average_frame_count output gives the frame count for speech delivered at an average speed of 130 words per minute. This is typically considered a standard speaking pace and is useful for most general-purpose audio-visual projects where a natural flow is desired.

fast_frame_count

This output parameter calculates the frame count for speech delivered at a fast pace of 160 words per minute. It is ideal for scenarios where a quicker delivery is needed, such as in dynamic or high-energy content, ensuring that the speech keeps up with fast-paced visuals.

Speech Length Calculator Usage Tips:

  • Ensure that all spoken words in your script are enclosed in quotes to accurately calculate the speech length.
  • Adjust the fps parameter to match the frame rate of your video project for precise synchronization.
  • Use the additional_time parameter to account for pauses or dramatic timing in your speech delivery.

Speech Length Calculator Common Errors and Solutions:

Invalid text input

  • Explanation: The text input is either empty or not a valid string.
  • Solution: Ensure that the text input is a non-empty string and that all spoken words are enclosed in quotes.

FPS out of range

  • Explanation: The fps value is set outside the allowed range of 1 to 120.
  • Solution: Adjust the fps value to be within the specified range to ensure accurate frame calculations.

Additional time negative

  • Explanation: The additional_time parameter is set to a negative value.
  • Solution: Set the additional_time to a non-negative value to avoid errors in frame calculation.

Speech Length Calculator Related Nodes

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

Speech Length Calculator