Audio Duration
This rule checks that an audio file's duration falls between the minimum and maximum specified limits.
Parameter table
param | unit | required | description |
---|---|---|---|
minDuration | no | The minimum allowed duration of the audio in seconds. | |
maxDuration | no | The 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:
- A version of the audio trimmed from the start up to the maximum duration.
- 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 eitherminDuration
ormaxDuration
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
value | valid | maxDuration | minDuration | description |
---|---|---|---|---|
❌ | 2 | 1 | The audio should be between 1 and 2 seconds. The actual audio file is 3 seconds long. |