vocal-separation / duration.py
mcuo's picture
Reserve ZeroGPU for song duration and collapse YouTube controls
c505747 verified
Raw History Blame Contribute Delete
256 Bytes
"""ZeroGPU reservation policy for audio separation."""
from math import ceil
def reserved_seconds(audio_seconds: float) -> int:
"""Reserve the full song length, bounded to 60–300 whole seconds."""
return max(60, min(300, ceil(audio_seconds)))