A script for automatically lowering the volume during radio advertisements and DJ announcements and turns the volume back up when songs are playing. It controls a Sonos speaker using the Soco-cli Python library when Tunein is being used.
It’s funny because broadcasters have notmalized ads at +6 dB compared to the rest of the radio. It’s actually measured in LUFS, and it’s normalized worldwide for radio, podcasts, TV, movies, and commercials, so that commercials are louder. LUFS measures the loudness , which is not exactly the same as volume - it makes quiet moments louder so that everything can be heard while the car engine runs, but the drawback is…
In the US, the loudness rule was made by politicians who had no technical background.
What they came up with was that the loudest part of the commercial can not be louder than the loudest part of the program surrounding it.
Broadcasters were quick to compress and limit the commercial audio into a brick, and normalize it just below the "100%" of the programming. The end result was a much, much louder commercial, that was technically a lower peak volume (but much higher average volume).
The law to lower the peak volume permits a higher average volume, and that has been exploited.