A dubbed line runs 40% longer: TTS speed tops out at 1.5, so rewrite

Translated lines often run long. Sume TTS speed is 0.6 to 1.5, so a line 40% too long can be sped up, but one 60% too long must be rewritten.

4 min readSume
All posts

A translated sentence rarely takes the same time to say as the original. When you dub a video, each new line has to land inside the time of the line it replaces. Sume TTS gives you one control for this: generation_config.speed, a multiplier from 0.6 to 1.5.

Do the arithmetic first

Render the line once and read its length from the word timings. Divide by the slot. The result is the speed you need.

Needed speed for a 5.0 second slot
Rendered lengthRatioWhat to do
4.6 s0.92Leave it, or speed 0.92
5.0 s1.00Keep speed 1.0
7.0 s1.40Speed 1.4, listen for rush
7.5 s1.50Maximum allowed, very fast
8.0 s1.60Over the cap: shorten the text

Why to stop short of 1.5

A 1.4x read of a long Spanish or German sentence is intelligible but tiring, and viewers notice. Treat 1.2 as the point where you consider a rewrite, and 1.5 as the hard stop. A shorter translation usually sounds better than a faster one.

The ratio in code

This Python needs no network. It turns a measured length and a slot into a speed or a rewrite instruction.

def speed_for(rendered_seconds, slot_seconds):
    ratio = rendered_seconds / slot_seconds
    if ratio <= 1.0:
        return {"action": "keep", "speed": 1.0}
    if ratio <= 1.5:
        return {"action": "speed_up", "speed": round(ratio, 2)}
    return {"action": "rewrite", "speed": 1.5, "ratio": round(ratio, 2)}


for rendered in (4.6, 7.0, 8.0):
    print(rendered, speed_for(rendered, 5.0))

What it costs

A re-render is cheap. A 120-character line is 1 cent, the minimum charge at $0.0475 per 1,000 characters, so two or three takes per line add a few cents to a 12-line dub. Keep the idempotency key different for each take, or Sume treats the call as a retry of the first.

Related posts

More in Use cases

All Use cases posts

Written by Sume