Skip to main content

Audio Duration

This rule checks that an audio file's duration falls between the minimum and maximum specified limits.

Parameter table​

paramunitrequireddescription
minDurationnoThe minimum allowed duration of the audio in seconds.
maxDurationnoThe maximum allowed duration of the audio in seconds.

Correction​

If the audio exceeds the maximum duration, the correction process attempts to trim the audio to meet the requirement. Two proposals are provided:

  1. A version of the audio trimmed from the start up to the maximum duration.
  2. A version of the audio trimmed from the end, keeping the last maxDuration seconds of the file. If the audio is shorter than the minimum duration, no automatic correction is possible, and the submission will need to be manually adjusted.

How to setup​

This rule enforces a specific duration range for the audio. The parameters are:

  • minDuration: The minimum allowed duration in seconds.
  • maxDuration: The maximum allowed duration in seconds. If either minDuration or maxDuration is not specified, that boundary is not enforced.

Creator tips​

  • Ensure the audio duration falls within the expected range.
  • If an audio file is too long or too short, you may need to trim or extend the file.
  • Trimming can be done through a variety of audio editing tools if the duration exceeds the limit.

Examples​

valuevalidmaxDurationminDurationdescription
sample-audio❌21The audio should be between 1 and 2 seconds. The actual audio file is 3 seconds long.