Does the file format of audio recordings (e.g. .wav vs .mp3) matter if you are performing acoustic analyses on them?

I am building a website that hosts acoustic recordings from marine animals (currently just fish - example here). On the website itself the files are best stored in MP3 format, as most internet browsers can play those and other formats are less supported. We also provide a download button, however, so users can copy the file for their own analyses, and do not know if it matters what format the downloaded files are in. There are storage size implications of needing to have multiple versions of each recording as the collection grows, but if the files won't actually support the community's needs then the website is not very useful.

Is there a standard in the community for a downloadable recording file? Are there limits on the software you could use or the analyses you could accurately perform if the files have been converted from WAV to MP3?

• As an aside: the images on that page are far too big, you're not sending appropriate caching headers, you should have header, footer { position: sticky; }, not position: fixed (otherwise the footer obscures the bottom part of the site on smaller windows), and you're giving the audio the text/wave MIME type. Jul 9, 2022 at 23:03
• Aside #2: over 96% of browsers can play FLAC, so you could just serve that (or another lossless compressed format). Jul 10, 2022 at 14:41

# MP3: A COMPRESSED FORMAT FOR HUMAN HEARING

MP3 and other coding formats use lossy (i.e. irreversible) data-compression to encode audio. The compression is based on human sound perception in order to reduce as much as possible the file size while not affecting how a human perceives the audio file as much as possible (ref).

# ANIMALS HEARING MAY RELY ON CUES THAT HAS BEEN REMOVED DURING MP3 ENCODING

1. If the goal of your website is to make human listen to animal sounds, then not-too-compressed MP3 files are alright as they would hardly make any difference in the sound quality.

2. If you would like the files to be used by bioacousticians or other sound technologists, then you should prefer to give the original format where it was recording. This is for at least 3 reasons:

• they may look for acoustic cues that animals use to communicate and these cues may be partly or entirely removed in the human-perception-based data compression such as MP3. This is the case in sound analysis or if playing-back sound to animals for experiments.
• they may look for acoustic cues that are not related to any animal sound perception in order to extract derived information, for instance to automatically recognize a type of sounds.
• they may like to re-encode the audio file in a different format, which is better achieved from a non-compressed file.

Note that giving e.g. WAV files may not be useful if it has been recorded in MP3 first, because some original informations are lost during e.g. MP3 encoding. In this case, it is better to give the compressed file if it is the original file.

• I would say that the optimal solution is to have mp3-files that users can listen to and wav-files for download for analysis purposes.
– user18
Jun 25, 2022 at 14:44
• As far as scientific study of animal hearing, the use of a sample rate of 44100 samples per second when recording will likely remove much more pertinent information than the drop that occurs when compressing a .wav to .mp3. Nothing above 22050 Hz can be encoded, and audio has to be subjected to considerable filtering in the top octave(s) in order to prevent aliasing. Jun 25, 2022 at 16:35
• I'd echo the need to have lossless compression or raw files available, if you goal is to truly have user be able to analyse the data (even given D. Stowell's comments on MP3 compression effect on subsequent analyses). Note that zipping a .wav file will compress it ~30 %, while "7z" will do ~50 % (7-zip.org). This compression in equivalent to what lossless formats can do (en.wikipedia.org/wiki/…) Jun 28, 2022 at 14:53

There isn't a standard, and using MP3 doesn't technically prevent any further software processing - because of course any MP3 can be decoded to WAV or similar whenever needed (and MP3->WAV does not lose any information, though some may already have been lost in the MP3 encoding).

Many archivists would warn you against using a lossy compression format such as MP3, because information is lost and this could cause problems or biases in further analysis. For example, MP3 compression is designed for human hearing, and deliberately discards parts of the signal that a human is not expected to hear (due to psychoacoustic masking effects) -- but those parts could be perceptible by animals and/or useful for someone's analysis! A good archival format is Broadcast WAV, which is basically the same as WAV for most purposes. However, you are right to mention that filesize can be a significant issue for large datasets, and lossy compression may be considered acceptable.

Some researchers have studied whether MP3 compression has an effect on later analysis, specifically on automatic recognition: Stowell & Plumbley 2014 (that's me) for birsong classification; Heath et al 2021 for ecoacoustic analysis; and probably others. Every time I've seen this studied, the MP3 compression makes little-to-no impact on the subsequent analysis. However, the papers I've read are mostly about terrestrial vertebrate sound -- I don't know how well those lessons generalise to marine sound (as in your question).

This is a nice paper discussing effects of various types of mp3 compression and comparing it to the effects of various types/degrees of noise: Araya-Salas M, G Smith-vidaurre & M Webster. 2019. Assessing the effect of sound file compression and background noise on measures of acoustic signal structure. Bioacoustics 28(1), 57–73.