'Normalizing audio in javascript AND saving result to file

Ive been playing around with JS normalizer to bring widely different volume recordings to play at a fairly constant volume.

This code is doing it's job quite nicely. My final goal though is to allow the user to record audio with the mic, then save the normalized audio to a file (I don't need to play it back, And I don't need the original recording once i have the normalized version of it).

Does anyone know how can this be accomplished?

BTW, since i first used this sample chrome now refuses to let the AudioContext object be set without user interaction, so a quick workaround is to move the declaration: var audioCtx = new AudioContext(); to the beginning of normalizedAudioElement function

Cheers!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source