3

I'm trying to "parse" and store the volume/dB and time data from an audio file (let's say a MP3 file).

Ideally, I want it formatted like this:

const dbData = {
  '00:00': 54,
  '00:01': 58,
  '00:02': 60,
  '00:03': 65,
  '00:04': 58,
  '00:05': 70,
  ...
}

Or something similar like a CSV or a JSON.

I have basic knowledge with the WebAudioAPI and I already know that you can read a file and extract the frequency for example.

Any help would be very appreciated!

Thanks!

user990463
  • 439
  • 1
  • 7
  • 27
  • Find a way to extract the PCM samples of your audio. Then find DBSPL algorithm to calculate the DB of your samples. Some [**research options**](https://www.google.co.uk/search?safe=strict&ei=xP_eXPHhJ_TDxgPmhJHQAQ&q=javascript+"db+spl") – VC.One May 17 '19 at 18:41
  • For example: http://teropa.info/blog/2016/08/30/amplitude-and-loudness.html . See the section about decibels... – VC.One May 17 '19 at 19:11
  • Would [this question](https://stackoverflow.com/questions/28123525/how-do-you-get-the-decibel-level-of-an-audio-in-javascript) or [that one](https://stackoverflow.com/questions/13734710/is-there-a-way-get-something-like-decibel-levels-from-an-audio-file-and-transfor) help? They explain how to extract dB from an audio file, then it's just a matter of formatting your dataset. – Robin Métral May 25 '19 at 05:04

0 Answers0