So you need to measure the ENVELOPE of the signal - and to do that you need eg a peak detector (as I said earlier, #6) or an envelope detector.
To do that in software you need to be sampling at a relatively high rate, while the ENVELOPE will by comparison be changing more slowly. Anyway you wont want to flash the LEDs fast (it CAN induce seizueres, "photic stimulation")
A simpler solution is to use a simple diode envelope detector like this

with the values shown it has a rise time constant of has a time constant of 1msec and a fall time constant of 100msec. if that is too long you could change the 1M to 100k
My preference (blame my hardware background) is generally for a few electronic components to simplify a LOT of code (eg for switch debouncing!) ... but I DO like @DVDdoug 's
“Worlds Simplest Effect”