Add normalization factor to audio on upload

I would like all audio uploads to be normalized by default, e.g. using established technology for music like Replay Gain.

This post may be relevant to read:

Agreed, I tend to upload the same audio for iNaturalist and eBird/Macaulay Library sometimes and Macaulay Library specifies that audio should be normalized to -3dB. I’ve gotten a comment from someone complaining that my audio uploads were way too loud and hurt their ears, since most uploads are directly from someone’s phone, which are super quiet, causing many sound ID-ers to have their volume pumped up by default. Normalizing audio by default could help address that.

1 Like

i’m not against having a playback-only option to do this maybe, but i wouldn’t want the original files that people upload to be changed.


Understandable. This is how Replay Gain would work, leaving the source record unchanged but shifting the playback to normalize perceived loudness without clipping.

okay. the title is a little confusing since it suggests a change upon upload, not a option during playback.

for what it’s worth, making this work during playback probably is not super straightforward and would probably require some sort of custom audio player interface. the iNat developers would probably not try to code this themselves and instead would look for some modules that have already been developed by others which are actively maintained. so if you’re really interested in this functionality, you might speed up its implementation if you can identify modules that can work for the web and for the upcoming React Native app.

1 Like

I’ve edited the title as you suggested. Does the ReplayGain standard seem reasonable?

as i noted before, the main challenge is probably finding / coding custom audio players that will handle normalization, whether using ReplayGain or any other technology. so if “reasonable” means “having a reasonable chance of being implemented”, then i think the most “reasonable” thing to do is use the technology that has the most well-developed and well-maintained modules.

Sorry for circling – I guess what I’m trying to ask is whether Replay Gain, which I believe has broad support, would work with the sound players iNat has available.

I have no idea what the backend is for iNat playback; it sounded like you might have some insight there, so I wondered if you knew off the top of your head (or could give me pointers on how to search). It sounds like my search should be “React Native web audio supporting Replay Gain”?

No worries if not – I meant it as a question not an assignment. :-D

1 Like

even after a file is encoded with ReplayGain metadata, you need a player that understands what to do with that metadata, right? the loudness adjustment won’t just happen on any setup.

when using the website, sound files are played using the browser’s base audio player. does any browser’s base audio player do anything with ReplayGain? if not, will a user of the iNat website hear a ReplayGain-encoded file at the normalized loudness? if not, you would need some sort of cross-browser, cross-platform custom web audio player (in place of the base browser player) to play the audio at the intended loudness. so has anyone developed such an audio player that iNat can incorporate into the website?

i haven’t seen the upcoming ReactNative app, but i’m guessing you’ll have a similar situation where it’ll just use whatever the base OS audio player is. can you rely on that to adjust the loudness appropriately according to ReplayGain metadata? if not, you’ll probably need some sort of custom cross-platform audio player that can be used in the ReactNative app. does such a thing exist?

if you can’t solve how to play ReplayGain-encoded audio at its intended loudness, then encoding audio with ReplayGain metadata doesn’t do anything for your users.

if you can solve the playback issue, then going with a ReplayGain approach is more “reasonable”. you still need to implement something to encode the ReplayGain metadata, but i assume that those modules are readily available. it’ll still be work to incorporate that into some sort of new audio upload process. but i’m guessing the the main conceptual challenge here would be just how to handle (unlikely) cases where an uploaded audio file already has ReplayGain metadata? do you replace it with iNat’s settings? or do you keep the user’s original metadata?

1 Like