Skip to main content

Audio Format

This rule checks that an audio has one of the specified formats.

Parameter table

paramunitrequireddescription
formatsyesThe list of the expected formats of the audio ordered by preference (e.g., ['wav', 'mp3']).

Correction

The correction process attempts to convert the audio format to the specified format if the audio does not match one of the expected formats.

How to setup

This rule enforces a specific audio format requirement. The only parameter is:

  • formats: The list of expected formats of the audio (e.g., ['wav', 'mp3']).

Creator tips

  • Verify the format requirement by checking the file extension or format specifications.
  • Ensure the audio format matches one of the expected formats.
  • By renaming a file, for example, changing a WAV file to MP3, you are not altering the file's actual format. We detect the MIME type and extension of the file based on the original file, even if you change the file's extension.
  • To convert an audio file to a different format, you can use online tools or specialized sound processing software.

Examples

valuevalidformatsdescription
sample-wav(wav, flac)The audio should be a WAV or a FLAC.
sample-mp3(aac, ogg)The audio should be an AAC or an OGG.