cosmir / openmic-2018

Tools and tutorials for the OpenMIC-2018 dataset.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

audio waveform normalization inconsistency

ejhumphrey opened this issue · comments

I've been checking our math given fresh eyes from the passage of time, and it seems like we (I) have been inconsistent as to when the audio signal gets normalized (scaled within [-1, 1]). In the initial work (the InstrumentDNN), all audio was scaled prior to waveform_to_examples. Now it looks like we're only doing that for the user if they come in through soundfile_to_examples... but not the other ones.

I'd propose the following corrective action:

  • add a normalize=True default kwarg to waveform_to_examples [src]
  • plumb this kwarg through wavfile_to.. and soundfile_to...

i see your point -- since normalization is (should be) idempotent, i think it makes more sense to do it as close to processing as possible (ie inside waveform_to_examples) as you suggest.